#include #include #include #include #include #include #include #include #include #include #include using namespace std; #define ll long long #define INF (1 << 30) #define INFLL (1LL << 60) int n,w[101],make_num,max_make[101]; bool bfs(int now,int sum){ if(sum == make_num) return true; if(sum > make_num || now == -1 || sum + max_make[now] < make_num) return false; return (bfs(now - 1,sum + w[now]) || bfs(now - 1,sum)); } int main() { bool ans = false; cin >> n; for(int i = 0;i < n;i++){ cin >> w[i]; make_num += w[i]; if(i == 0) max_make[i] = w[i]; else max_make[i] = max_make[i-1] + w[i]; } sort(w,w + n); if(make_num % 2 == 1) ans = false; else{ make_num = make_num / 2; ans = bfs(n-1,0); } if(ans) cout << "possible" << endl; else cout << "impossible" << endl; return 0; }