//赚点积分下资源
#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
#define esp 1e-8
struct upoint{double x;double y;}Point[1003];
int stack[1003];
int N;
double Xmult(upoint a,upoint b,upoint c)
{
return (a.x-c.x)*(b.y-c.y)-(b.x-c.x)*(a.y-c.y);
}
double dis(upoint a,upoint b)
{
return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y));
}
bool dayu(double a,double b)
{
return a-esp>b;
}
bool cmp(upoint a,upoint b)
{
return a.x<b.x||(a.x==b.x&&a.y<b.y);
}
int tubao()
{
sort(Point,Point+N,cmp);
int top=1;
for(int i=0;i<3;i++)stack[i]=i;
for(int i=2;i<N;i++)
{
while(top)
{
double x=Xmult(Point[i],Point[stack[top]],Point[stack[top-1]]);
double d1=dis(Point[i],Point[stack[top-1]]);
double d2=dis(Point[stack[top]],Point[stack[top-1]]);
if(x>0)top--;
else if(x==0&&dayu(d1,d2))top--;
else break;
}
stack[++top]=i;
}
int t=top;
stack[++top]=N-2;
for(int i=N-3;i>=0;i--)
{
while(top>t)
{
double x=Xmult(Point[i],Point[stack[top]],Point[stack[top-1]]);
double d1=dis(Point[i],Point[stack[top-1]]);
double d2=dis(Point[stack[top]],Point[stack[top-1]]);
if(x>0)top--;
else if(x==0&&dayu(d1,d2))top--;
else break;
}
stack[++top]=i;
}
return top;
}
bool manzu(int i,int j,int k)
{
return 0==(Point[i].x-Point[k].x)*(Point[j].y-Point[k].y)-(Point[i].y-Point[k].y)*(Point[j].x-Point[k].x);
}
bool nothave(int i,int j)
{
for(int k=0;k<N;k++)
if(k!=i&&k!=j)
{
if(manzu(i,j,k))return false;
}
return true;
}
int main()
{
int kase;
cin>>kase;
while(kase--)
{
cin>>N;
for(int i=0;i<N;i++)
{
int a,b;
cin>>a>>b;
Point[i].x=1.0*a;
Point[i].y=1.0*b;
}
if(N<=5)
{
cout<<"NO\n";
continue;
}
int top=tubao();
if(top<3)
{
cout<<"NO\n";
continue;
}
int yes=1;
for(int i=1;i<top;i++)
{
int j=i-1;
if(nothave(stack[i],stack[j])){yes=0;break;}
}
if(nothave(stack[top-1],stack[0]))yes=0;
if(yes)cout<<"YES\n";
else cout<<"NO\n";
}
return 0;
}
//0 1 0 2 0 3 0 4 0 5 NO
//N<=5 NO
//TOP<3 NO~