N = int(input()) a = list(map(int,input().split())) a = sorted(a) b = True z=[] for i in range(N-1): #print(i-a[i]+1) if i-a[i]+1<0: b = False break z.append(i-a[i]+2) if b: print("YES") for i in z: print(i) else: print("NO")