N=int(input()) A=list(map(int,input().split())) A.sort() for i in range(N): if (A[i]-A[0])%N!=0: print('No') exit() print('Yes')