#include #include using namespace std; int main() { int N; cin >> N; vector W(N); int S = 0; for (int i = 0; i < N; ++i) { cin >> W[i]; S = W[i]; } vector> dp(N + 1, vector(S + 1, false)); dp[0][0] = true; for (int i = 1; i <= N; ++i) { for (int s = 0; s <= S; ++s) { if (s + W[i - 1] <= S) { dp[i][s] = dp[i - 1][s + W[i - 1]]; } if (s - W[i - 1] >= 0) { dp[i][s] = dp[i - 1][s - W[i - 1]]; } } } if (dp[N][0]) { cout << "possible" << endl; } else { cout << "impossible" << endl; } }