#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { int n; cin >> n; int w[n]; for (int i = 0; i < n; i++) cin >> w[i]; int sum = 0; for (int i = 0; i < n; i++) sum += w[i]; if (sum%2) { cout << "impossible" << endl; return 0; } bool memo[sum+1]; memset(memo, false, sizeof(memo)); for (int i = 0; i < n; i++) { for (int j = 0; j <= sum; j++) { if (j+w[i] >= sum) break; if (memo[j]) memo[j+w[i]] = true; } for (int j = 0; j < n; j++) { memo[w[i]] = true; } } if (memo[sum/2]) { cout << "possible" << endl; }else { cout << "impossible" << endl; } }