#include using namespace std; int popcount(int n) { int ret = 0; while (n > 0) ret += n & 1, n >>= 1; return ret; } int main() { int n; cin >> n; bool f = false; for (int i = n % 2; i < 30; i += 2) { if (popcount(n + i) == i) f = true; } cout << (f ? "YES\n" : "NO\n"); return 0; }