#include #include int main() { using namespace std; int n, tot = 0; cin >> n; vector w(n); for (auto &e : w) { cin >> e; tot += e; } if (tot % 2 > 0) { cout << "impossible\n"; return 0; } const int m = tot / 2; vector dp(n + 1, vector(m + 1, false)); dp[0][0] = true; for (int i = 0; i < n; i++) { for (int j = 0; j <= m; j++) { if (!dp[i][j]) { continue; } dp[i + 1][j] = true; if (j + w[i] <= m) { dp[i + 1][j + w[i]] = true; } } } cout << (dp[n][m] ? "possible\n" : "impossible\n"); }