#include using namespace std; bool R[40005][40005]; pair P[40005][40005]; unsigned short nr,i,N; int V[40005]; unsigned short j,k,ok,col,tmp; int main() { cin>>N; for(i=1;i<=N;i++) { cin>>V[i]; V[i]%=N; R[i][V[i]]=1; P[i][V[i]]=make_pair(0,0); for(j=1;j