#include #include using namespace std; int dp[100][10000] ; int N,w[100] ,sum = 0 ; int eql(int i,int j){ //iは添え字jはi以降の重さの総和 if(dp[i][j]>=0) return dp[i][j] ; int res ; if(i==N){ res = 0 ; }else if(j==w[i]){ res = 1 ; }else{ res = max(eql(i+1,j-w[i]),eql(i+1,j)) ; } return dp[i][j] = res ; } int main(void){ cin >> N ; for(int i=0;i> w[i] ; sum += w[i] ; } memset(dp,-1,sizeof(dp)) ; if(sum%2==0){ sum /= 2 ; if(eql(0,sum)==1) cout << "possible" ; else cout << "impossible" ; }else{ cout << "impossible" ; } }