#include using namespace std; template struct Point{ public: T x,y; Point() : x(0),y(0) {} Point(T a,T b) : x(a),y(b) {} Point &operator=(const Point &b) = default; Point operator+(const Point &b){return Point(x+b.x,y+b.y);} Point operator-(const Point &b){return Point(x-b.x,y-b.y);} Point operator+=(const Point &b){return *this=*this+b;} Point operator-=(const Point &b){return *this=*this-b;} bool operator==(const Point &b){return x==b.x && y==b.y;} bool operator!=(const Point &b){return x!=b.x || y!=b.y;} bool operator<(const Point &b){ if(x == b.x) return y < b.y; else return x < b.x; } bool operator<=(const Point &b){return (*this) < b || (*this) == b;} bool operator>(const Point &b){return !((*this) <= b);} bool operator>=(const Point &b){return !((*this) < b);} friend T inner(const Point a,const Point b){return a.x*b.x+a.y*b.y;} friend T cross(const Point a,const Point b){return a.x*b.y-a.y*b.x;} friend T twodist(const Point a,const Point b){return (a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y);}//2乗で返す. }; template istream &operator>>(istream &is,Point &a){ is >> a.x >> a.y; return is; } template ostream &operator<<(ostream &os,Point &a){ os << a.x << " " << a.y; return os; } int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); long long N,K; cin >> N >> K; vector> H(N); int idx = 0; for(auto &[h,p] : H) cin >> h,p = idx++; sort(H.begin(),H.end()); vector> P(N); for(auto &p : P) cin >> p; vector del(N); for(int i=0; i