N = int(input()) A = list(map(int, input().split())) M = 150001 exist = [-1] * M for i, ai in enumerate(A): if exist[ai] != -1: ans = [0] * N ans[i] = -ai ans[exist[ai]] = ai print('Yes') print(*ans) quit() exist[ai] = i order = sorted(range(N), key=lambda i:A[i]) dp = [[0]*2*M] dp[0][0] = 1 for pos, i in enumerate(order): ai = A[i] if dp[-1][ai]: print('Yes') ans = [0] * N ans[i] = -ai now = ai for ii in order[:pos][::-1]: dp.pop() aii = A[ii] if dp[-1][now]: continue if -M+1 <= now - aii and dp[-1][now-aii]: now -= aii ans[ii] = aii continue if now + aii < M and dp[-1][now+aii]: now += aii ans[ii] = -aii print(*ans) quit() nex = [0] * 2*M for j in range(-M+1, M): nex[j] |= dp[-1][j] if dp[-1][j]: if -M+1 <= j-ai: nex[j-ai] = 1 if j+ai < M: nex[j+ai] = 1 dp.append(nex) print('No')