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}] 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 now-aii in dp[-1]: now -= aii ans[ii] = aii elif 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(s - ai) nex.add(s + ai) dp.append(nex) print('No')