#include <bits/stdc++.h>
using namespace std;
const int N_MAX = 1000;
bool used[N_MAX];
int main() {
  int n, m;
  cin >> n;
  m = n * n;
  int prev = 0;
  used[prev] = true;
  for (int step = 1; step <= m; ++step) {
    (prev += step) %= n;
    used[prev] = true;
  }
  cout << ((*min_element(used, used + n)) ? "YES" : "NO") << endl;
  return 0;
}
