#include using namespace std; using ll = long long; using vll = vector; int main() { ll n; cin >> n; vll w(n); ll sum = 0; for (ll i = 0; i < n; i++) { cin >> w[i]; sum += w[i]; } if (sum % 2 != 0) { cout << "impossible" << endl; } else { vector> dp(n + 1, vector(sum)); dp[0][0] = 1; for (ll i = 0; i < n; i++) { for (ll j = 0; j < sum; j++) { if (dp[i][j] == 1) { dp[i + 1][j] = 1; if (j + w[i] < sum) dp[i + 1][j + w[i]] = 1; } } } cout << ((dp[n - 1][(ll)sum / 2] == 1) ? "possible" : "impossible"); } system("pause"); }