#include #include using namespace std; using namespace atcoder; // 型エイリアス using ll = long long; using mint = modint; using pll = pair; using tll = tuple; using tll4 = tuple; using vll = vector; using vvll = vector; using vvvll = vector; using vdl = vector; using vvdl = vector; using vvvdl = vector; using vch = vector; using vvch = vector; using vvvch = vector; using vst = vector; using vvst = vector; using vvvst = vector; using vbo = vector; using vvbo = vector; using vvvbo = vector; using vmi = vector; using vvmi = vector; using vvvmi = vector; using vpll = vector; using vvpll = vector; using vvvpll = vector; using vtll = vector; using vvtll = vector; using vvvtll = vector; using vtll4 = vector; using vvtll4 = vector; using vvvtll4 = vector; // rep系 #define rep(i, n) for(ll i=0;i<(n);i++) #define rep1(i, n) for(ll i=1;i<=(n);i++) #define rep3(i, m, n) for(ll i=(m);i<(n);i++) #define rep4(i, m, n, d) for(ll i=(m);i<(n);i+=(d)) #define rrep(i, m, n) for(ll i=(m);i>=(n);i--) // 入力 template void CIN(T& x) { cin >> x; } template void CIN(T& x, Ts&... xs) { cin >> x; CIN(xs...); } #define LL(...) ll __VA_ARGS__; CIN(__VA_ARGS__) #define DBL(...) double __VA_ARGS__; CIN(__VA_ARGS__) #define CHAR(...) char __VA_ARGS__; CIN(__VA_ARGS__) #define STR(...) string __VA_ARGS__; CIN(__VA_ARGS__) #define VEC(type, name, N) vector name(N); for(auto& x: name) cin >> x #define VEC2(type, name, N, M) vector> name(N, vector(M)); for(auto& v : name) for(auto& x : v) cin >> x // 出力 const vector YESNO = {"Yes", "No"}; template void pr(const T& a, const Ts&... b) { cout << a; ((cout << ' ' << b), ...); cout << '\n'; } template void prs(const Ts&... a) { ((cout << a << ' '), ...); cout << '\n'; } template void prvec(const Container& c) { bool first = true; for (const auto& x : c) {if (!first) {cout << ' ';} cout << x; first = false; } cout << '\n'; } #define yes pr(YESNO[0]) #define no pr(YESNO[1]) inline bool yn(bool f) { if (f) { yes; return true; } no; return false; } // その他便利マクロ #define ALL(v) (v).begin(),(v).end() #define RALL(v) (v).rbegin(),(v).rend() template ll SZ(T& v) { return v.size(); } template void ADD(T& v, const U& x) { if constexpr (ranges::range) { for (auto& e : v) { ADD(e, x); } } else { v += x; } } template void INC(Container& C) { ADD(C, 1); } template void DEC(Container& C) { ADD(C, -1); } template auto SUM(const T& v) { if constexpr (ranges::range) { decltype(SUM(*begin(v))) ret = 0; for (const auto& e : v) { ret += SUM(e); } return ret; } else { return v; } } template ll MAXID(const Container& C) { return distance(C.begin(), max_element(C.begin(), C.end())); } template ll MINID(const Container& C) { return distance(C.begin(), min_element(C.begin(), C.end())); } template ll FINDID(const Container& C, T x) { return distance(C.begin(), find(C.begin(), C.end(), x)); } template ll LBID(const Container& C, T x) { return distance(C.begin(), lower_bound(C.begin(), C.end(), x)); } template ll UBID(const Container& C, T x) { return distance(C.begin(), upper_bound(C.begin(), C.end(), x)); } template bool CHMIN(T& a, U b){ if(a>b){ a=b; return true; } return false; } template bool CHMAX(T& a, U b){ if(a void SORT(Ts&... xs) { vector v = {xs...}; sort(v.begin(), v.end()); int i = 0; ((xs = v[i++]), ...); } template bool INGRID(T x, T y, T H, T W) { return x >= 0 && x < H && y >= 0 && y < W; } template T MOD(T n, U m) { return (n % m + m) % m; } template T CEIL(T n, U d) { return (n + d - 1) / d; } template auto RLE(const Container& C) { vector> ret; for (const auto& x : C) { if (ret.empty() || x != ret.back().first) { ret.emplace_back(x, 1); } else { ret.back().second++; } } return ret; } template vector CUM(const vector& V) { vector ret(V.size()+1, 0); for (ll i = 0; i < V.size(); i++) { ret[i+1] = ret[i] + V[i]; } return ret; } // 定数 const ll INF = 4'000'000'000'000'000'000LL; const ll DI[] = {1, -1, 0, 0}; const ll DJ[] = {0, 0, 1, -1}; const ll DI8[] = {-1, -1, -1, 0, 0, 1, 1, 1}; const ll DJ8[] = {-1, 0, 1, -1, 1, -1, 0, 1}; const string DIR = "DURL"; const bool IS_MULTI_CASE = false; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout << fixed << setprecision(15); // --- ここからコードを書く --- LL(N); VEC(ll, W, N); vbo flags(10001, false); ll sum = 0; rep(i, N){ rrep(j, 10000, 0){ if(j-W[i] >= 0 && flags[j-W[i]]){ flags[j] = true; } } flags[W[i]] = true; sum += W[i]; } if(sum % 2 == 0 && flags[sum/2]){ pr("possible"); }else{ pr("impossible"); } // --------------------------- return 0; }