#include using namespace std; int main(void){ int n,w[1005], sum = 0, m; bool dp[1005][1005]; cin >> n; for(int i=0;i> w[i]; sum += w[i]; } for(int i=0; i<1005;i++){ for(int j=0;j<1005;j++){ dp[i][j] = false; } } if(sum %2 == 1){ cout << "impossible" << endl; return 0; }else{ m = sum/2; dp[0][0] = true; for(int i=0; i