#include #include #include using namespace std; #define REP(i, N) for(int i=0;i<(N);++i) int main() { int n; cin >> n; vector ws(n); REP(i, n) cin >> ws[i]; int sum = accumulate(ws.begin(), ws.end(), 0); if (sum % 2 == 1) { cout << "impossible" << endl; return 0; } int half = sum / 2; vector memo(10000, false); memo[0] = true; for (int w : ws) { for (int i = half; i >= 0; --i) if(memo[i]) memo[i+w] = true; } if (memo[half]) { cout << "possible" << endl; } else { cout << "impossible" << endl; } }