#include #include #include #include #include #include #include #include #include #define _USE_MATH_DEFINES #include #include #include #include #define REP(i,n) for(int (i)=0;(i)<(n);(i)++) #define RREP(i,n) for(int (i)=(n)-1;(i)>=0;(i)--) #define debug(x) cout< P; typedef priority_queue maxpq; typedef priority_queue,greater > minpq; typedef priority_queue

p_maxpq; typedef priority_queue,greater

> p_minpq; typedef vector veci; typedef vector

vecp; typedef vector vecs; typedef long long int LL; #define INF 2000000000 struct edge{int to,cost;}; int main(void) { int N;cin>>N; int W[100],weight = 0; REP(i,N) cin >> W[i]; REP(i,N) weight += W[i]; bool dp[10000] = {0}; dp[0] = true; REP(i,N) { for(int j = weight/2-W[i];j >= 0;j--) { dp[j+W[i]] |= dp[j]; } } if((weight%2==1)||!dp[weight/2]) cout <<"impossible"<