#include using namespace std; typedef long long ll; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n; cin >> n; vectorv(n); int sum = 0; for (int i = 0; i < n; i++) { cin >> v[i]; sum += v[i]; } if (sum & 1) { cout << "impossible" << endl; exit(0); } if (n < 20) { for (int mask = 0; mask < (1 << n); mask++) { int s = 0; for (int i = 0; i < n; i++) { if (mask & (1 << i)) { s += v[i]; } if (s == sum / 2) { cout << "possible" << endl; exit(0); } } } cout << "impossible" << endl; exit(0); } vectordp(sum + 1, false); dp[sum] = true; for (int i = 0; i < n; i++) { for (int j = sum; j >= 0; j--) { if (dp[j] && j - v[i] >= 0) { dp[j - v[i]] = true; } } } if (dp[sum / 2]) cout << "possible" << endl; else cout << "impossible" << endl; }