#include using namespace std; #include //using namespace atcoder; using ll = long long; using ull = unsigned long long; using i128 = __int128_t; using u128 = unsigned __int128_t; using mint = atcoder::static_modint<998244353>; const int mod = 998244353; #include mt19937_64 rng(std::chrono::steady_clock::now().time_since_epoch().count()); int dx[8] = {-1, 1, 0, 0, -1, -1, 1, 1}; int dy[8] = {0, 0, -1, 1, -1, 1, -1, 1}; template bool chmin(T& a, const T& b){ if (b < a){ a = b; return true; } else { return false; } } template bool chmax(T& a, const T& b){ if (a < b){ a = b; return true; } else { return false; } } void solve(){ int n; cin >> n; vector a(n); vector> vec(150001); for (int i = 0; i < n; i++){ cin >> a[i]; vec[a[i]].push_back(i); } for (int i = 0; i <= 150000; i++){ if (vec[i].size() >= 2){ cout << "Yes" << '\n'; for (int j = 0; j < n; j++){ if (vec[i][0] == j){ cout << i << ' '; } else if (vec[i][1] == j){ cout << -i << ' '; } else { cout << 0 << ' '; } } cout << '\n'; return; } } int k = min(n, 22); map mp; for (int i = 0; i < 1 << k; i++){ ll sum = 0; for (int j = 0; j < k; j++){ if ((i >> j) & 1){ sum += a[j]; } } if (mp.count(sum)){ cout << "Yes" << '\n'; int j = mp[sum]; for (int x = 0; x < n; x++){ if (x < k){ int now = 0; if ((i >> x) & 1){ now += a[x]; } if ((j >> x) & 1){ now -= a[x]; } cout << now << ' '; } else { cout << 0 << ' '; } } cout << '\n'; return; } mp[sum] = i; } cout << "No" << '\n'; }; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int t = 1; while(t--){ cout << fixed << setprecision(15); solve(); } }