def main(): import sys input = sys.stdin.readline N = int(input()) A = list(map(int, input().split())) ans = [0] * N seen = [[] for _ in range(300010)] flg = 0 ok = 0 for i in range(N): if flg: break for j in range(i+1, N): if seen[A[i]+A[j]]: k, l = seen[A[i]+A[j]] ans[i] = 1 ans[j] = 1 ans[k] = -1 ans[l] = -1 flg = 1 ok = 1 break else: seen[A[i]+A[j]] = [i, j] S = sum(A) if not ok: dp = [[False] * (2*S+10) for _ in range(N+1)] dp[0][0] = True for i, a in enumerate(A): for j in range(S+1): if dp[i][j]: dp[i+1][j+a] = True dp[i+1][j-a] = True if i==0 and j==0: continue dp[i+1][j] = True for j in range(-1, -S-1, -1): if dp[i][j]: dp[i+1][j+a] = True dp[i+1][j-a] = True dp[i+1][j] = True if dp[i+1][0]: idx = i ok = 1 break if ok: j = 0 for i in range(idx, -1, -1): if j-A[i] >= -S: if dp[i][j-A[i]]: j = j - A[i] ans[i] = 1 continue if j+A[i] <= S: if dp[i][j+A[i]]: j = j + A[i] ans[i] = -1 for i in range(N): ans[i] *= A[i] if ok: print('Yes') print(*ans) else: print('No') if __name__ == '__main__': main()