#include #include #include #include using namespace std; bool chk( vector w, int i, int half ); int main() { int N; cin >> N; vector W(N); for(int i = 0 ; i < N; i++ ){ cin >> W[i]; } sort( W.begin(), W.end() ); int half = 0; for( auto x: W ) { half += x; } if( half%2 == 1 ) { cout << "impossible" << endl; return 0; } half = half / 2; if( chk( W, 0, half ) ) { cout << "possible" << endl; } else { cout << "impossible" << endl; } return 0; } bool chk( vector w, int i, int half ) { if( i >= w.size() ) { return false; } if( w[i] == half ) { return true; } if( w[i] < half ) { bool tmp = chk( w, i+1, half - w[i] ); if( tmp ) { return true; } if( i <= 0 ) { return false; } //return chk( w, i-1, half+w[i] ); //return chk( w, i+2, half ); return false; } if( w[i] > half ) { return false; } return false; }