def solve(): N = int(input()) S = list(map(int, input().split())) for i in range(1, N): if S[i] % N != S[0] % N: return 'No' return 'Yes' print(solve())