// #pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include #include using namespace std; using namespace atcoder; using mint = modint998244353; // using mint = modint1000000007; using ll = long long; using ull = unsigned long long; using ld = long double; using pii = pair; using pll = pair; using T = tuple; using G = vector>; #define rep(i, n) for (ll i = 0; i < (n); ++i) #define rep2(i, a, b) for (ll i = a; i < (b); ++i) #define rrep2(i, a, b) for (ll i = a-1; i >= (b); --i) #define rep3(i, a, b, c) for (ll i = a; i < (b); i+=c) #define rng(a) a.begin(),a.end() #define rrng(a) a.rbegin(),a.rend() #define popcount __builtin_popcount #define popcountll __builtin_popcountll #define fi first #define se second #define UNIQUE(v) sort(rng(v)), v.erase(unique(rng(v)), v.end()) #define MIN(v) *min_element(rng(v)) #define MAX(v) *max_element(rng(v)) template bool chmin(T &a,T b){if(a>b){a=b;return 1;}else return 0;} template bool chmax(T &a,T b){if(a void printv(vector &v){rep(i,v.size())cerr< void printvv(vector> &v){rep(i,v.size())rep(j,v[i].size())cout<> n; vector a(n); rep(i, n) cin >> a[i]; int sum = 0; rep(i, n) sum += a[i]; if (sum&1){ cout << "impossible" << endl; return 0; } sum /= 2; vector> dp(sum+1, vector(n+1)); dp[0][0] = 1; rep(i, n){ vector> pre(sum+1, vector(n+1)); swap(pre, dp); rep(j, sum+1){ int nj = j+a[i]; rep(k, n+1){ if (nj <= sum && k < n) dp[nj][k+1] += pre[j][k]; dp[j][k] += pre[j][k]; } } } ll ans = 0; rep(i, n+1) ans += dp[sum][i]; cout << ((ans != 0 && ans != 1) ? "possible" : "impossible") << endl; return 0; }