#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #define _GLIBCXX_DEBUG #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { int n; cin >> n; ll a = 1, m = (1LL << (n + 1)) - 1; for (int x = 2; x <= n; x++) { a *= (1LL << x) - 1; a %= m; } Debug(a, m); cout << (a % m == 0 ? "Yes" : "No") << endl; return 0; }