fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. // freopen("input.txt", "r", stdin);
  7. // freopen("output.txt", "w", stdout);
  8.  
  9. int n, flag = 0;
  10. cin >> n;
  11.  
  12.  
  13. if(n>0&&(n&n-1)==0)
  14. flag=1;
  15.  
  16. if (flag)
  17. cout << "YES" << endl;
  18. else
  19. cout << "NO" << endl;
  20.  
  21. return 0;
  22. }
  23.  
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
NO