N=int(input()) A=list(map(int, input().split())) d=0 for i in range(N): if (A[-1-i]+d)%(N-i)==0: d+=(A[-1-i]+d)//(N-i) elif A[-1-i]+d!=0: print('No') exit() print('Yes')