#include #include using namespace std; int one; int add(int a, int b) { while (b) { int c = (a&b) << one; a ^= b; b = c; } return a; } bool ok(int n) { for (int i = (one << one); i <= sqrt(n); i = add(i, one)) { if (!(n%i))return false; } return true; } int main() { one = !one; int n; scanf("%d", &n); if (n == one)puts("NO"); else puts(ok(n) ? "YES" : "NO"); }