N = int(input()) A = list(map(int, input().split())) cum_sum = [0] * (N + 1) for i in range(N): cum_sum[i + 1] = cum_sum[i] + A[i] for i, a in enumerate(A, 1): if (cum_sum[-1] - cum_sum[i - 1]) % i: print('No') exit() print('Yes')