N = int(input()) A = list(map(int,input().split())) M = min(22, N) def calc(): global M dp = [0] * (M * 150000) Smax = 1 dic1 = {0:(0,)} dic2 = {} flag = 1 for i in range(M): for k,v in dic1.items(): if k+A[i] in dic2: for x in v: dic2[k+A[i]] = dic2[k+A[i]] + tuple([x | 1 << i]) if len(dic2[k+A[i]]) == 2: return dic2[k+A[i]] else: for x in v: dic2[k+A[i]] = tuple([x | 1 << i]) dic1.update(dic2) return False x = calc() if x == False: print("No") else: a,b = x k = 1 for i in range(M): if (a | b) & k: if a & b & k: A[i] = 0 elif b & k: A[i] = -A[i] else: A[i] = 0 k <<= 1 if N > M: for i in range(M,N): A[i] = 0 print("Yes") print(*A)