from itertools import accumulate N = int(input()) *A, = map(int, input().split()) last = 0 for i, a in enumerate(A): if a: last = i A = A[:last+1] C = list(accumulate([1 if a else 0 for i, a in enumerate(A)][::-1]))[::-1] C = C[1:]+[0] if all(a <= (i+1) and (a+c) % (i+1) == 0 for i, (a, c) in enumerate(zip(A, C))): print('Yes') else: print('No')