import sys read = sys.stdin.read readline = sys.stdin.readline readlines = sys.stdin.readlines N, *A = map(int, read().split()) sm = sum(A) if sm % N: print('No') sys.exit() num = sm // N c1 = 0 c2 = 0 for i in range(1, N): if abs(A[i] - A[i - 1]) % N == 0: continue else: print('No') break else: print('Yes')