def main(): import sys input = sys.stdin.readline N = int(input()) A = list(map(int, input().split())) ans = [0] * N seen = [[] for _ in range(150001)] 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] if not ok: for i in range(N): if seen[A[i]]: j, k = seen[A[i]] ans[i] = 1 ans[j] = -1 ans[k] = -1 ok = 1 break if not ok: seen2 = [-1] * 150001 for i in range(N): if seen2[A[i]] != -1: j = seen2[A[i]] ans[i] = 1 ans[j] = -1 ok = 1 break else: seen2[A[i]] = i S = sum(A) if not ok: dp = [[False] * (2*S+1) for _ in range(2*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 if i==0 and j==0: continue 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 dp[i][j-A[i]]: j = j - A[i] ans[i] = 1 elif 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()