#include "bits/stdc++.h" using namespace std; int main() { int N; cin >> N; for(int i = 30; i > 0; i--) { long long x = (1 << i) - 1; if(N >= x) N -= x; } if(N == 0) cout << "YES" << endl; else cout << "NO" << endl; return 0; }