#include <bits/stdc++.h>
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int exp(long long int x, long long int y) {
  long long int res = 1;
  x = x % 1000000007;
  while (y > 0) {
    if (y & 1) res = (res * x) % 1000000007;
    y = y >> 1;
    x = (x * x) % 1000000007;
  }
  return res;
}
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int n, push = 0, f = 0;
  cin >> n;
  vector<long long int> v(n);
  v[push] = 1;
  for (long long int i = 1; i < n + 1; i++) {
    v[(push + i) % n] = 1;
    push = (push + i) % n;
  }
  for (long long int i = 0; i < n; i++) {
    if (v[i] == 0) {
      f = 1;
      break;
    }
  }
  if (f == 0)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
