#include #include using namespace std; int n,m,i,fin,fin1; struct pie { int x,y; }a[100000]; int cmp(pie a,pie b) { if(a.x!=b.x) return a.x>b.x; else return a.y