N = int(input()) A = list(map(int, input().split())) S = sum(A) if S % N != 0: print("No") exit() S //= N SS = set() for a in A: SS.add((S - a)%N) print("Yes") if len(SS) == 1 else print("No")