#include #include #include #include #include using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int q; cin>>q; while(q--){ int n,x,y,x1,x2,y1,y2; cin>>n; bool flag=true; if(n==1) {cout<<"NO"<>x1>>y1; cin>>x2>>y2; if(x1==x2)x2=-100000; else if(y1==y2)y2=-100000; for(int i=2;i>x>>y; if(x2<-10000 && x!=x1)x2=x; if(y2<-10000 && y!=y1)y2=y; if((x!=x1 && x!=x2) && (y!=y1 && y!=y2)){flag=false; break;} } if(x2<-10000 || y2<-10000 || flag==false) {cout<<"NO"<