fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. ios_base::sync_with_stdio(0);
  6. cin.tie(0);
  7.  
  8. #ifndef ONLINE_JUDGE
  9. freopen("input.txt", "r", stdin);
  10. freopen("output.txt", "w", stdout);
  11. #endif
  12.  
  13. long long x;
  14. cin >> x;
  15. double logvalue = log2(x);
  16.  
  17. if (logvalue == (long long)logvalue)
  18. {
  19. cout << "YES" << endl;
  20. }
  21. else
  22. {
  23. cout << "NO" << endl;
  24. }
  25. return 0;}
Success #stdin #stdout 0.01s 5280KB
stdin
Standard input is empty
stdout
NO