#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define all(x) (x).begin(),(x).end() #define rall(x) (x).rbegin(),(x).rend() #define rep(i,n) for(int i=0; i pi; typedef pair pl; typedef pair plc; typedef pair pss; int n,sum; int w[110]; int dp[110][110]; int main() { cin >> n; rep(i, n) { cin >> w[i+1]; sum += w[i+1]; } if (sum % 2 != 0) { cout << "impossible" << endl; return 0; } dp[0][0] = 0; for (int i = 1; i <= n; i++) { for (int j = 0; j <= sum/2; j++) { if (j < w[i]) { dp[i][j] = dp[i - 1][j]; }else{ dp[i][j] = max(dp[i - 1][j-w[i-1]]+w[i], dp[i-1][j]); } } } for (int i = 1; i <= n; i++) { for (int j = 0; j <= sum/2; j++) { if (dp[i][j] == sum / 2) { cout << "possible" << endl; return 0; } } } cout << "impossible" << endl; return 0; }