/* -*- coding: utf-8 -*- * * 2795.cc: No.2795 Perfect Number - yukicoder */ #include #include using namespace std; /* constant */ const long long pfns[] = { 6LL, 28LL, 496LL, 8128LL, 33550336LL, 8589869056LL, 137438691328LL, 2305843008139952128LL, //1000000000000000000 }; /* typedef */ using ll = long long; /* main */ int main() { ll n; scanf("%lld", &n); int k = 0; while (pfns[k] < n) k++; if (pfns[k] == n) puts("Yes"); else puts("No"); return 0; }