#include <bits/stdc++.h>
using namespace std;
const long long OO = (long long)1e12 + 7;
const long long mod = (long long)1e9 + 7;
const long long MAX = (int)1e5 + 5;
int main() {
  int n;
  cin >> n;
  if (n & (n - 1)) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
  }
  return 0;
}
