#include <bits/stdc++.h>   using namespace std;   int a[1001];   int main() {     int n;     scanf( %d , &n);     int m = n;     int pos = 0;     int k = 1;     while (true) {       if (a[pos] == 0) m--;       if (m == 0) {         printf( YES n );         return 0;       }       a[pos] = 1;       if (pos == (pos + k) % n) {         printf( NO n );         return 0;       }       pos = (pos + k) % n;       k++;     }     return 0;   }   