N = int(input()) A = list(map(int, input().split())) exist = [-1] * (max(A) + 1) 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}] for pos, i in enumerate(order): ai = A[i] if ai in dp[-1]: ans = [0] * N ans[i] = -ai now = ai for ii in order[:pos][::-1]: dp.pop() aii = A[ii] if abs(now-aii) in dp[-1]: now -= aii ans[ii] = aii elif abs(now+aii) in dp[-1]: now += aii ans[ii] = -aii print('Yes') print(*ans) quit() nex = set() for s in dp[-1]: nex.add(s) nex.add(abs(s - ai)) nex.add(s + ai) dp.append(nex) print('No')