//Nishant Arora //I love KS. #include using namespace std; int main() { //freopen("input.txt","r",stdin); std::ios::sync_with_stdio(false); cin.tie(0); int n,x,y,a,b,c,d; cin>>n>>x>>y; pair > >p[n]; for(int i=0;i>a>>b>>c>>d; p[i].first=c; p[i].second.first=d; p[i].second.second.first=a; p[i].second.second.second=b; } sort(p,p+n); reverse(p,p+n); int i=0; long long ans=p[i].second.first,lata=p[i].second.second.first,lona=p[i].second.second.second; for(int i=1;i