链接:http://codeforces.com/problemset/problem/55/A
直接暴力 ..
#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int maxn=100005;
map<int,int>m;
int main()
{
int n;
scanf("%d",&n);
ll res=0;
for(int i=1;i<maxn;i++)
{
res+=i;
m[res%n+1]++;
}
if(m.size()==n)
printf("YES\n");
else
printf("NO\n");
return 0;
}