N = int(input()) a = list(map(int,input().split())) b = [] for i in range(N - 1): b.append(a[i + 1] - a[i]) flag = True for i in b: if i % N != 0: flag = False print('Yes') if flag else print('No')