#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  if (1 == N) {
    cout << "YES\n";
    return 0;
  }
  if (N & (N - 1)) {
    cout << "NO\n";
  } else {
    cout << "YES\n";
  }
  return 0;
}
