#include #include #include #include #include using namespace std; #include bool comp(paira,pairb) { if(a.second>b.second)return true; else return false; } int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int q; cin>>q; while(q--) { int n; int x1 = INT_MAX,y1 = INT_MAX,x2= INT_MIN,y2=INT_MIN; cin>>n; vector>arr(n); for(int i = 0 ;i>a>>b; if(ax2)x2 = a; if(by2)y2 = b; arr[i].first = a; arr[i].second = b; } if(n<=2) { cout<<"YES"<=y1 && y<=y2) && !((y == y1 ||y==y2)&& x>=x1 && x<=x2)) { //cout<