#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } constexpr long long MAX = 5100000; constexpr long long INF = 1LL << 60; constexpr int inf = 1 << 28; constexpr long long mod = 1000000007LL; //constexpr long long mod = 998244353LL; using namespace std; typedef unsigned long long ull; typedef long long ll; constexpr int mx = 15000 * 22 + 1; vector dp[mx]; int main() { /* cin.tie(nullptr); ios::sync_with_stdio(false); */ ll n; scanf("%lld", &n); vector a(n); for (int i = 0; i < n; i++) scanf("%lld", &a[i]); vector res(n); if (n > 22) a.resize(22); n = a.size(); for (int S = 0; S < (1 << n); S++) { int sum = 0; for (int i = 0; i < n; i++) { if (S >> i & 1) sum += a[i]; } dp[sum].push_back(S); } for (int i = 0; i < mx; i++) if (dp[i].size() >= 2) { int S1 = dp[i][0]; int S2 = dp[i][1]; puts("Yes"); for (int i = 0; i < n; i++) { if (S1 >> i & 1) { res[i] = a[i]; } if (S2 >> i & 1) { res[i] = -a[i]; } } for (int i = 0; i < n; i++) { cout << res[i]; if (i == n - 1) cout << "\n"; else cout << " "; } return 0; } puts("No"); return 0; }