#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define PB push_back #define all(a) (a).begin(),(a).end() #define ALL(v) begin(v), end(v) #define DWN(a) (a).begin(),(a).end(), greater() #define rep(i, m) for (int i = 0; i < m; i++) #define REP(i, n, m) for (int i = n; i < m; i++) #define V vector #define VV vector #define VVV vector using namespace std; typedef long long ll; typedef pair P; const int dx[4] = { 1, 0, -1, 0 }; const int dy[4] = { 0, 1, 0, -1 }; const int inf = (int)1e9; const ll INF = (ll)1e18; const ll MOD{ (ll)1e9 + 7 }; const long double EPS = 1e-10; bool dp[101][10001]; int main() { int n, w[101]; cin >> n; rep(i, n) cin >> w[i]; rep(i, 101) { rep(j, 10001) { dp[i][j] = false; } } int sum = 0; rep(i, n) sum += w[i]; if (sum % 2 != 0) { cout << "impossible" << endl; return 0; } dp[0][0] = true; for (int i = 0; i < n; i++) { for (int j = 0; j <= 100000; j++) { if (dp[i][j] == true) { dp[i + 1][j + w[i]] = true; //左の天秤 dp[i + 1][j] = true; //右の天秤 } } } if (dp[n][sum / 2] == true) { //釣り合うとき、左 = sum / 2 cout << "possible" << endl; } else { cout << "impossible" << endl; } return 0; }