#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
#define ll long long
ll p,x[5],y[5],t;
int i,j,tt;
ll sqr(ll x)
{
return x*x;
}
long double dist(ll x1, ll y1, ll x2, ll y2)
{
return sqrt(sqr(x1-x2)+sqr(y1-y2));
}
long double getcos(ll x1, ll y1, ll x2, ll y2, ll x3, ll y3, ll x4, ll y4)
{
ll a1,b1,a2,b2;
a1=x1-x2;
b1=y1-y2;
a2=x3-x4;
b2=y3-y4;
long double d1=sqrt(a1*a1+b1*b1);
long double d2=sqrt(a2*a2+b2*b2);
return (a1*a2+b1*b2)/(d1*d2);
}
void square(ll q1, ll q2, ll q3, ll q4)
{
ll x1,x2,y1,y2,x3,y3,x4,y4;
long double d1,d2,d3,d4,w1,w2,w3,w4;
if(p>0) return;
x1=x[q1];y1=y[q1];
x2=x[q2];y2=y[q2];
x3=x[q3];y3=y[q3];
x4=x[q4];y4=y[q4];
d1=dist(x1,y1,x2,y2);
d2=dist(x2,y2,x3,y3);
d3=dist(x3,y3,x4,y4);
d4=dist(x4,y4,x1,y1);
if(d1==d2&&d2==d3&&d3==d4)
{
w1=getcos(x2,y2,x1,y1,x2,y2,x3,y3);
w2=getcos(x3,y3,x2,y2,x3,y3,x4,y4);
w3=getcos(x4,y4,x3,y3,x4,y4,x1,y1);
w4=getcos(x1,y1,x4,y4,x1,y1,x2,y2);
if(w1==w2&&w2==w3&&w3==w4&&w4==0)p=1;
}
return;
}
void rectangle(ll q1, ll q2, ll q3, ll q4)
{
ll x1,x2,y1,y2,x3,y3,x4,y4;
long double d1,d2,d3,d4,w1,w2,w3,w4;
if(p>0) return;
x1=x[q1];y1=y[q1];
x2=x[q2];y2=y[q2];
x3=x[q3];y3=y[q3];
x4=x[q4];y4=y[q4];
d1=dist(x1,y1,x2,y2);
d2=dist(x2,y2,x3,y3);
d3=dist(x3,y3,x4,y4);
d4=dist(x4,y4,x1,y1);
if(d1==d3&&d2==d4)
{
w1=getcos(x2,y2,x1,y1,x2,y2,x3,y3);
w2=getcos(x3,y3,x2,y2,x3,y3,x4,y4);
w3=getcos(x4,y4,x3,y3,x4,y4,x1,y1);
w4=getcos(x1,y1,x4,y4,x1,y1,x2,y2);
if(w1==w2&&w2==w3&&w3==w4&&w4==0)p=2;
}
return;
}
void rhombus(ll q1, ll q2, ll q3, ll q4)
{
ll x1,x2,y1,y2,x3,y3,x4,y4;
long double d1,d2,d3,d4,w1,w2,w3,w4;
if(p>0) return;
x1=x[q1];y1=y[q1];
x2=x[q2];y2=y[q2];
x3=x[q3];y3=y[q3];
x4=x[q4];y4=y[q4];
d1=dist(x1,y1,x2,y2);
d2=dist(x2,y2,x3,y3);
d3=dist(x3,y3,x4,y4);
d4=dist(x4,y4,x1,y1);
if(d1==d2&&d2==d3&&d3==d4)
{
w1=getcos(x2,y2,x1,y1,x2,y2,x3,y3);
w2=getcos(x3,y3,x2,y2,x3,y3,x4,y4);
w3=getcos(x4,y4,x3,y3,x4,y4,x1,y1);
w4=getcos(x1,y1,x4,y4,x1,y1,x2,y2);
if(w1==w3&&w2==w4)p=3;
}
return;
}
void parallelogram(ll q1, ll q2, ll q3, ll q4)
{
ll x1,x2,y1,y2,x3,y3,x4,y4;
long double d1,d2,d3,d4,w1,w2,w3,w4;
if(p>0) return;
x1=x[q1];y1=y[q1];
x2=x[q2];y2=y[q2];
x3=x[q3];y3=y[q3];
x4=x[q4];y4=y[q4];
d1=dist(x1,y1,x2,y2);
d2=dist(x2,y2,x3,y3);
d3=dist(x3,y3,x4,y4);
d4=dist(x4,y4,x1,y1);
if(d1==d3&&d2==d4)
{
w1=getcos(x2,y2,x1,y1,x2,y2,x3,y3);
w2=getcos(x3,y3,x2,y2,x3,y3,x4,y4);
w3=getcos(x4,y4,x3,y3,x4,y4,x1,y1);
w4=getcos(x1,y1,x4,y4,x1,y1,x2,y2);
if(w1==w3&&w2==w4)p=4;
}
return;
}
int main()
{
scanf("%d", &t);
for(tt=0;tt<t;tt++)
{
p=0;
scanf("%lld%lld%lld%lld%lld%lld%lld%lld", &x[1], &y[1], &x[2], &y[2], &x[3], &y[3], &x[4], &y[4]);
for(i=1;i<4;i++)
if(p==0)
for(j=i+1;j<5;j++)
if(x[i]==x[j]&&y[i]==y[j])
{
p=5;
break;
}
square(1,2,3,4);square(1,2,4,3);square(1,3,2,4);square(1,3,4,2);square(1,4,2,3);square(1,4,3,2);
square(2,1,3,4);square(2,1,4,3);square(2,3,1,4);square(2,3,4,1);square(2,4,1,3);square(2,4,3,1);
square(3,1,2,4);square(3,1,4,2);square(3,2,1,4);square(3,2,4,1);square(3,4,1,2);square(3,4,2,1);
square(4,1,2,3);square(4,1,3,2);square(4,2,1,3);square(4,2,3,1);square(4,3,1,2);square(4,3,2,1);
rectangle(1,2,3,4);rectangle(1,2,4,3);rectangle(1,3,2,4);rectangle(1,3,4,2);rectangle(1,4,2,3);rectangle(1,4,3,2);
rectangle(2,1,3,4);rectangle(2,1,4,3);rectangle(2,3,1,4);rectangle(2,3,4,1);rectangle(2,4,1,3);rectangle(2,4,3,1);
rectangle(3,1,2,4);rectangle(3,1,4,2);rectangle(3,2,1,4);rectangle(3,2,4,1);rectangle(3,4,1,2);rectangle(3,4,2,1);
rectangle(4,1,2,3);rectangle(4,1,3,2);rectangle(4,2,1,3);rectangle(4,2,3,1);rectangle(4,3,1,2);rectangle(4,3,2,1);
rhombus(1,2,3,4);rhombus(1,2,4,3);rhombus(1,3,2,4);rhombus(1,3,4,2);rhombus(1,4,2,3);rhombus(1,4,3,2);
rhombus(2,1,3,4);rhombus(2,1,4,3);rhombus(2,3,1,4);rhombus(2,3,4,1);rhombus(2,4,1,3);rhombus(2,4,3,1);
rhombus(3,1,2,4);rhombus(3,1,4,2);rhombus(3,2,1,4);rhombus(3,2,4,1);rhombus(3,4,1,2);rhombus(3,4,2,1);
rhombus(4,1,2,3);rhombus(4,1,3,2);rhombus(4,2,1,3);rhombus(4,2,3,1);rhombus(4,3,1,2);rhombus(4,3,2,1);
parallelogram(1,2,3,4);parallelogram(1,2,4,3);parallelogram(1,3,2,4);parallelogram(1,3,4,2);parallelogram(1,4,2,3);parallelogram(1,4,3,2);
parallelogram(2,1,3,4);parallelogram(2,1,4,3);parallelogram(2,3,1,4);parallelogram(2,3,4,1);parallelogram(2,4,1,3);parallelogram(2,4,3,1);
parallelogram(3,1,2,4);parallelogram(3,1,4,2);parallelogram(3,2,1,4);parallelogram(3,2,4,1);parallelogram(3,4,1,2);parallelogram(3,4,2,1);
parallelogram(4,1,2,3);parallelogram(4,1,3,2);parallelogram(4,2,1,3);parallelogram(4,2,3,1);parallelogram(4,3,1,2);parallelogram(4,3,2,1);
if(p==1)printf("SQUARE\n");else
if(p==2)printf("RECTANGLE\n");else
if(p==3)printf("RHOMBUS\n");else
if(p==4)printf("PARALLELOGRAM\n");else
if(p==0)printf("QUADRILATERAL\n");else
printf("NONE\n");
}
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CiNpbmNsdWRlPGNzdGRpbz4KI2luY2x1ZGU8Y21hdGg+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKI2RlZmluZSBsbCBsb25nIGxvbmcKCmxsIHAseFs1XSx5WzVdLHQ7CmludCBpLGosdHQ7CgpsbCBzcXIobGwgeCkKewogICAgcmV0dXJuIHgqeDsKfQoKbG9uZyBkb3VibGUgZGlzdChsbCB4MSwgbGwgeTEsIGxsIHgyLCBsbCB5MikKewogICAgcmV0dXJuIHNxcnQoc3FyKHgxLXgyKStzcXIoeTEteTIpKTsKfQoKbG9uZyBkb3VibGUgZ2V0Y29zKGxsIHgxLCBsbCB5MSwgbGwgeDIsIGxsIHkyLCBsbCB4MywgbGwgeTMsIGxsIHg0LCBsbCB5NCkKewogICAgbGwgYTEsYjEsYTIsYjI7CgogICAgYTE9eDEteDI7CiAgICBiMT15MS15MjsKCiAgICBhMj14My14NDsKICAgIGIyPXkzLXk0OwoKICAgIGxvbmcgZG91YmxlIGQxPXNxcnQoYTEqYTErYjEqYjEpOwogICAgbG9uZyBkb3VibG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