fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. long long k;
  6. cin>>k;
  7. while (k > 1) {
  8. if(k%2!=0){
  9. cout<<"NO";
  10. return 0;}
  11. k/=2;}
  12.  
  13. cout<<"YES";
  14.  
  15. }
Success #stdin #stdout 0s 5320KB
stdin
10
stdout
NO