N = int(input()) if N == 2: print("Yes") exit() A = list(map(int, input().split())) B = set([A[i] % (N - 2) for i in range(N)]) if sum(A) % N == 0 and len(B) == 1: print("Yes") else: print("No")