#include #include int main(int argc, char **argv) { int n = -1; int w = -1; int amount_w = 0; int half_w = 0; std::vector ws; std::cin >> n; for (int i = 0; i < n; i++) { std::cin >> w; amount_w += w; ws.push_back(w); } if (amount_w % 2 != 0) { std::cout << "impossible\n"; return 0; } bool checks[10001] = { false }; checks[0] = true; for (int i = 0; i < n; i++) { w = ws.at(i); for (int j = amount_w; j >= 0; j--) { if (!checks[j]) { continue; } checks[j + w] = true; } } half_w = amount_w / 2; if (checks[half_w]) { std::cout << "possible\n"; } else { std::cout << "impossible\n"; } return 0; }