#include using namespace std; typedef long long ll; #define REP(i,n) for(int i=0,_n=(int)(n);i<_n;++i) #define ALL(v) (v).begin(),(v).end() #define CLR(t,v) memset(t,(v),sizeof(t)) templateostream& operator<<(ostream& os,const pair&a){return os<<"("<void pv(T a,T b){for(T i=a;i!=b;++i)cout<<(*i)<<" ";cout<void chmin(T&a,const T&b){if(a>b)a=b;} templatevoid chmax(T&a,const T&b){if(a a(N); REP(i, N) a[i] = nextInt(); bool yes = false; vector s, t; dp[0] = 0; REP(i, N) { for (int v = MAX_V - MAX_A; v >= 0; v--) { if (dp[v] >= 0 && v + a[i] < MAX_V) { if (dp[ v + a[i] ] != -1) { yes = true; { int S = v + a[i]; while (S > 0) { int p = dp[S]; s.push_back(p); S -= a[p]; } } { t.push_back(i); int S = v; while (S > 0) { int p = dp[S]; t.push_back(p); S -= a[p]; } } goto END; } else { dp[ v + a[i] ] = i; } } } } END: if (yes) { cout << "Yes" << endl; vector ans(N); for (int x : s) ans[x]--; for (int x : t) ans[x]++; bool first = true; REP(i, N) { if (first) { first = false; } else printf(" "); printf("%d", ans[i] * a[i]); } printf("\n"); } else { cout << "No" << endl; } return 0; } int main() { #ifdef LOCAL for (;!cin.eof();cin>>ws) #endif main2(); return 0; }