#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() { ll n; cin >> n; set perfect_number_under_1e18 = { 6, 28, 496, 8128, 33550336, 8589869056, 137438691328, 2305843008139952128 }; if (perfect_number_under_1e18.contains(n)) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }