#include //const static double de_PI = 3.14159265358979323846; //const static double de_EPS = 0.000001; //const static int de_MOD = 1000000007; //const static int de_MAX = 999999999; //const static int de_MIN = -999999999; inline void Calc(const int &sum, const int &count, const int &idx, const std::vector &W, const int &target) { if (sum == target) { std::cout << "possible" << std::endl; exit(0); } if (count <= 0) { return; } if (idx >= static_cast(W.size())) { return; } Calc(sum + W[idx], count - 1, idx + 1, W, target); Calc(sum, count, idx + 1, W, target); } int main(void) { //std::ifstream inf("123.txt"); std::cin.rdbuf(inf.rdbuf()); int N = 0; std::cin >> N; std::vector W(N); for (int i = 0; i < N; i++) { std::cin >> W[i]; } int total = std::accumulate(W.begin(), W.end(), 0); if (total % 2 != 0) { std::cout << "impossible" << std::endl; return 0; } Calc(0, N / 2, 0, W, total / 2); std::cout << "impossible" << std::endl; }