#include using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int t; cin>>t; while(t-->0){ int n; cin>>n; if(n<=3){ cout<<"YES"<> v; int xmin=INT_MAX,xmax=INT_MIN,xminymin=INT_MAX,xminymax=INT_MIN,xmaxymin=INT_MAX,xmaxymax=INT_MIN; while(n-->0){ int x,y; cin>>x>>y; v.push_back(pair(x,y)); if(xxminymax){ xminymax=y; } } if(x>xmax){ xmax=x; if(yxmaxymax){ xmaxymax=y; } } } } return 0; }