#include using namespace std; #define fastcin {\ cin.tie(0);\ ios::sync_with_stdio(false);\ } #define scan(x) cin >> x #define print(x) cout << x << "\n" int main() { fastcin; int n, i, j; scan(n); int sum = 0, w[n]; for (i = 0; i < n; ++i) { scan(w[i]); sum += w[i]; } if (!(sum & 0x01)) { int half = sum/2; bool dp[half+1][n+1]; for (i = 0; i < n+1; ++i) for (j = 0; j < half+1; ++j) dp[i][j] = false; dp[0][0] = true; for (i = 0; i < n; ++i) { for (j = 0; j < half+1; ++j) { dp[i+1][j] |= dp[i][j]; if (j+w[i] <= half) dp[i+1][j+w[i]] |= dp[i][j]; } if (dp[i+1][half]) { print("possible"); exit(0); } } } else print("impossible"); return 0; }