#include using namespace std; int main() { int n; cin >> n; vector w(n); for (int i = 0; i < n; i++) cin >> w.at(i); int wsum = accumulate(w.begin(), w.end(), 0), whalf = wsum / 2; if (wsum % 2 != 0) { cout << "impossible" << endl; return 0; } vector> s(n + 1, vector(whalf + 1, false)); s.at(0).at(0) = true; for (int i = 0; i < n; i++) { for (int j = 0; j <= whalf; j++) { if (s.at(i).at(j) || (j - w.at(i) >= 0 && s.at(i).at(j - w.at(i)))) s.at(i+1).at(j) = true; } } if (s.at(n).at(whalf)) { cout << "possible" << endl; } else { cout << "impossible" << endl; } }