#include <cstdio>

template <int i, int n> struct For2
{
  enum { value = (n % i == 0) | For2<i - 1, n>::value };
};

template <int n> struct For2<1, n> { enum { value = 0 }; };
template <int n> struct For2<0, n> { enum { value = 0 }; };

template <int n> struct Sqrt
{
  enum { x = 2 * Sqrt<n / 4>::value } ;
  enum { value = (x + 2) * (x + 2) <= n ? (x + 2) : ((x + 1) * (x + 1) <= n ? (x + 1) : x) };
};

template <> struct Sqrt<0> { enum { value = 0 }; };

template <int n> struct CheckPrime
{
  enum { value = For2<Sqrt<n>::value, n>::value };
};

template <int l, int r, int *a> struct For { static int value; };
template <int l, int r, int *a> int For<l, r, a>::value =
  For<l, (l + r) / 2, a>::value + For<(l + r) / 2 + 1, r, a>::value;

template <int l, int *a> struct For<l, l, a> { static int value; };
template <int l, int *a> int For<l, l, a>::value = (a[l] = CheckPrime<l>::value);

template <int n> struct IsPrime
{
  static int a[n];
  static int get( int i );
  static int calc;
};

template <int n> int IsPrime<n>::a[n];
template <int n> int IsPrime<n>::get( int i ) { return a[i]; };
template <int n> int IsPrime<n>::calc = For<0, n - 1, a>::value;

int main()
{
  const int MAX = 403;
  IsPrime<MAX>::calc;
  for (int n = 2; n < MAX; n++)
    printf("%d : %s\n", n, !IsPrime<MAX>::get(n) ? "YES" : "NO");
  return 0;
}