#include #define rep(i,n) for (int i=0; i<(n); ++i) using namespace std; using ll = long long; const int MX = 3400000; ll dp[MX]; int rev[MX]; int main() { fill_n(dp, MX, 0); fill_n(rev, MX, -1); int N; cin >> N; vector A(N); for (int i=0; i> A[i]; int M = min(N, 22); for (int i=1; i<=M; ++i) { int l = 1 << (i-1); int r = 1 << i; for (int j=l; j= 0) { S = rev[dp[i]]; T = i; break; } rev[dp[i]] = i; } if (S < 0) { cout << "No" << endl; } else { vector ans(N, 0); for (int i=0; i> i) & 1; bool tb = (T >> i) & 1; if ( ! (sb ^ tb)) continue; else if (sb) ans[i] = A[i] * (-1); else if (tb) ans[i] = A[i]; } cout << "Yes" << endl; for (int i=0; i