#include #include #include #include #include #include #include #include using namespace std; int zero, one = !zero; void inc(int& i) { for (int m = one;; m <<= one) { i ^= m; if (i & m) break; } } int main() { int n; cin >> n; bool b = n > one; for (int i = one << one; i < n; inc(i)) { if (!(n % i)) b = false; } cout << (b ? "YES" : "NO") << endl; return zero; }