#include using namespace std; #define DEBUG(x) cout<<#x<<": "< #define vl vector #define vii vector< vector > #define vll vector< vector > #define vs vector #define pii pair #define pis pair #define psi pair #define pll pair #define fi first #define se second #define rep(i,n) for(int i=0;i<(int)(n);i++) #define rep1(i,n) for(int i=1;i<=(int)(n);i++) #define all(c) c.begin(),c.end() #define in(x, a, b) a <= x && x < b const int inf = 1000000001; const ll INF = 2e18; const ll MOD = 1000000007; //const ll mod = 1000000009; const double pi = 3.14159265358979323846; #define Sp(p) cout<> n; for (int i = 32; i >= 0; i--) { if (n >= (1LL << i) - 1) { n -= ((1LL << i) - 1); } } if (n == 0) { cout << "YES" << endl; } else { cout << "NO" << endl; } }