#include using namespace std; int main(){ int n; cin >> n; vector A(n); copy_n(istream_iterator(cin), n, A.begin()); sort(A.begin(), A.end()); if (unique(A.begin(), A.end()) != A.end()){ puts("Yes"); return 0; } int m = n; const constexpr int k = 20; n = min(n, k); const constexpr int upper = k * 150000; vector> DP(n + 1); bitset<2 * upper + 1> zero; zero.set(upper); for (int i = 0; i < n; i++){ DP[i + 1] = (zero << A[i]) | (zero >> A[i]) | (DP[i] << A[i]) | (DP[i] >> A[i]) | DP[i]; } if (!DP[n][upper]){ puts("No"); return 0; } puts("Yes"); for (int i = 0; i < n; i++) DP[i].set(upper); vector ans; int pos = upper; for (int i = n - 1; i >= 0; i--){ if (DP[i][pos + A[i]]){ ans.push_back(-1); pos += A[i]; } else if(DP[i][pos - A[i]]){ ans.push_back(1); pos -= A[i]; } else ans.push_back(0); } reverse(ans.begin(), ans.end()); for (int i = 0; i < n; i++) cout << A[i] * ans[i] << " "; for (int i = n; i < m; i++) cout << 0 << " "; cout << endl; }