#!usr/bin/env python3 from collections import defaultdict, deque from heapq import heappush, heappop from itertools import permutations, accumulate import sys import math import bisect def LI(): return [int(x) for x in sys.stdin.buffer.readline().split()] def I(): return int(sys.stdin.buffer.readline()) def LS():return [list(x) for x in sys.stdin.readline().split()] def S(): res = list(sys.stdin.readline()) if res[-1] == "\n": return res[:-1] return res def IR(n): return [I() for i in range(n)] def LIR(n): return [LI() for i in range(n)] def SR(n): return [S() for i in range(n)] def LSR(n): return [LS() for i in range(n)] sys.setrecursionlimit(1000000) mod = 1000000007 def solve(): n = I() a = LI() d = defaultdict(lambda : 0) for i in a: if d[i]: d[i] += 1 break d[i] = 1 if d[i] == 2: print("Yes") ans = [] for j in a: if j == i and d[j]: ans.append((2*d[j]-3)*j) d[j] -= 1 else: ans.append(0) print(*ans) return if n > 21: print("No") return f = [0,1,-1] dpl = defaultdict(lambda : None) dpl[0] = 0 dpl[a[0]] = 1 dpl[-a[0]] = 2 l = set(dpl.keys()) n1 = n>>1 for ii in range(1,n1): b = 3**ii ai = a[ii] for i in l: for k in range(3): ni = f[k]*ai+i nj = dpl[i]+b*k if nj: dpl[ni] = nj l = set(dpl.keys()) n2 = n-n1 dpr = defaultdict(lambda : None) dpr[0] = 0 dpr[a[n1]] = 1 dpr[-a[n1]] = 2 l = set(dpr.keys()) for ii in range(1,n2): b = 3**ii ai = a[ii+n1] for i in l: for k in range(3): ni = f[k]*ai+i nj = dpr[i]+b*k if nj: dpr[ni] = nj l = set(dpr.keys()) dpr = list(dpr.items()) dpr.sort() for i,j in dpl.items(): b = bisect.bisect_left(dpr,(i,j)) if b >= len(dpr): continue if dpr[b][0] == i and j+dpr[b][1]: k = dpr[b][1] break else: print("No") return ans = [] for i in range(n1): ans.append(a[i]*f[j%3]) j //= 3 for i in range(n2): ans.append(-a[i+n1]*f[k%3]) k //= 3 print("Yes") print(*ans) return #Solve if __name__ == "__main__": solve()