n = int(input()) a = list(map(int, input().split())) m = min(a) for i in range(n): a[i] -= m if sorted(a) == [i for i in range(n)]: print("No") else: print("No" if sum(a) % n else "Yes")