#include <stdio.h>
#include <algorithm>
using namespace std;
struct point {
int x, y;
};
bool cmp(point p1, point p2) {
return p1.y < p2.y || p1.y == p2.y && p1.x < p2.x;
}
int cross(point p0, point p1, point p2) {
return (p1.x - p0.x)*(p2.y - p0.y)-(p1.y - p0.y)*(p2.x - p0.x);
}
void tubao(point *p, int n, point *ch, int &m) {
int i, k;
sort(p, p + n, cmp);
for (m = i = 0; i < n; i++) {
while (m > 1 && cross(ch[m - 2], ch[m - 1], p[i]) < 0)m--;
ch[m++] = p[i];
}
if (n = m)return;
k = m;
for (i = n - 2; i >= 0; i--) {
while (m > k && cross(ch[m - 2], ch[m - 1], p[i]) < 0)m--;
ch[m++] = p[i];
}
if (n > 1)m--;
}
bool judge(point *p, int n) {
if (n < 6)return 0;
for (int i = 2; i < n; i++)
if (cross(p[0], p[1], p[i]) != 0)return 1;
return 0;
}
int main() {
point p[1010], ch[1010];
int t, n;
scanf("%d", &t);
while (t--) {
scanf("%d", &n);
for (int i = 0; i < n; i++)
scanf("%d%d", &p[i].x, &p[i].y);
bool flag = judge(p, n);
if (flag) {
tubao(p, n, ch, n);
ch[n] = ch[0];
point a, b;
for (int i = 1; flag && i < n;) {
a = ch[i - 1], b = ch[i++];
flag = 0;
while (i <= n && cross(a, b, ch[i]) == 0) {
flag = 1;
i++;
}
}
}
puts(flag ? "YES" : "NO");
}
return 0;
}