N = int(input()) a = list(map(int, input().split())) connected = [False] * (N + 2) # 1-based indexing connected[1] = True smallest_unconnected = 2 x_list = [] possible = True for ai in a: k = smallest_unconnected found = False while k <= N: if not connected[k]: x = k - ai if x >= 1 and connected[x]: connected[k] = True x_list.append(x) # Update smallest_unconnected while smallest_unconnected <= N and connected[smallest_unconnected]: smallest_unconnected += 1 found = True break else: k += 1 else: k += 1 if not found: possible = False break if possible and smallest_unconnected > N: print("YES") for x in x_list: print(x) else: print("NO")