#include #include #include #include #include #include #include #include #include using namespace std; bool ss(pair< pair, pair > l, pair< pair, pair > r) { if (l.first != r.first) return l.first < r.first; if (l.first.second != r.first.second) return l.first.second < r.first.second; if (l.second.first != r.second.first) return l.second.first < r.second.first; return l.second.second < r.second.second; } int main(void) { int n, x, y; cin >> n >> x >> y; vector< pair< pair, pair > > p(n); for(int i=0; i> p[i].first.first >> p[i].first.second >> p[i].second.first >> p[i].second.second; } sort(p.begin(), p.end(), ss); int nla = 0, nlo = 0, nh = 0, np = 0; for(int i=0; i