a=int(input()) b = list(map(int, input().split())) b=sorted(b) for i in range(len(b)-1): if (b[i+1]-b[i]) %a ==0: c=True else: c=False break if c==True: print("Yes") else: print("No")