""" https://yukicoder.me/problems/no/1017 300000ペア以上あれば、必ず衝突する 長さ600以下の場合、ちゃんと考えないとダメか? dpして復元かなぁ... しかし、A[i]が大きい場合に苦しい 3つ、4つと増やしていけばいいか 重複はない 最初の22項だけ取ればいいのか """ import sys N = int(input()) A = list(map(int,input().split())) dic = {} def check( pos ): s = 0 for p in pos: s += A[p] if s in dic: ans = [0] * N for p in dic[s]: ans[p] = -1 * A[p] for p in pos: ans[p] = 1 * A[p] print ("Yes") print (*ans) sys.exit() dic[s] = pos MM = min(N,22) for bit in range(2**MM): pos = [] for i in range(MM): if (2**i) & bit: pos.append(i) check( tuple(pos) ) print ("No")