#include #include using namespace std; int main() { long long n; cin >> n; long long sb = 0, sp = 0; map, long long> scores; if (n % 2 == 1) { cout << "impossible" << endl; return 0; } for (long long i = 0; i < n; i++) { long long b, p; cin >> b >> p; sb += b; sp += p; scores[make_pair(b, p)]++; } if (sb % (n / 2) != 0) { cout << "impossible" << endl; return 0; } if (sp % (n / 2) != 0) { cout << "impossible" << endl; return 0; } sb = sb / (n / 2); sp = sp / (n / 2); for (auto it = scores.begin(); it != scores.end(); it++) { auto other = make_pair(sb - it->first.first, sp - it->first.second); if (scores[other] != it->second) { cout << "impossible" << endl; return 0; } } cout << "possible" << endl; return 0; }