#include using namespace std; typedef long long ll; const int INF = 1<<30; const long long INFLL = 1LL<<60; const int MOD = 998244343; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); ll n; cin >> n; vector a{6, 28, 496, 8128, 33550336, 8589869056, 137438691328}; if (find(a.begin(), a.end(), n) != a.end()) cout << "Yes" << endl; else cout << "No" << endl; }