n = int(input()) a = list(map(int, input().split())) v = [0] * n v[0] = 1 ans = [] for i in range(n - 1): for j in range(n): if v[j]: try: if v[a[i] + j]: continue else: v[a[i] + j] = 1 ans.append(j + 1) break except: exit(print("NO")) print("YES") print(*ans, sep="\n")