N = int(input()) A = list(map(int, input().split())) ok = True for a in A : ok = ok and (a % N == A[0] % N) print("Yes" if ok else "No")