#include <bits/stdc++.h>
#pragma GCC diagnostic error "-std=c++11"
#define SIS std::ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)
//#define endl '
'
#define all(A) (A).begin(),(A).end()
#define FOR(I, A, B) for (int I = (A); I <= (B); ++I)
#define PER(I, A, B) for (int I = (A); I >= (B); --I)
#define lson k*2
#define rson k*2+1
#define fi first
#define se second
#define DB(A) cout<<(A)<<endl
#define DB1(A,B,C) cout<<(A)<<" "<<(B)<<" "<<(C)<<"!"<<endl
#define PB push_back
#define Pair pair<int,int>
#define MP make_pair
#define LL long long
using namespace std;
const int maxn=1000+10;
const int MAX=1000;
const int inf=0x3f3f3f3f;
const int mod=1e9+7;
const double eps=1e-10;
const double pi=acos(-1);
//head
int n,m;
struct node
{
int x,y;
};
double dis(node a,node b)
{
return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y));
}
double cross(node a,node b,node c,node d)
{
return (b.x-a.x)*(d.y-c.y)-(b.y-a.y)*(d.x-c.x);
}
void solve()
{
node na,nb,nc;
cin>>na.x>>na.y>>nb.x>>nb.y>>nc.x>>nc.y;
double l1=dis(na,nb);
double l2=dis(nb,nc);
double l3=dis(na,nc);
double s=cross(na,nb,na,nc);
s=fabs(s);
if (s<eps)
{
printf("NO SOLUTION
");
return;
}
double r=s/(l1+l2+l3);
double sinn=(s)/(l3*l2);
double R=l1/sinn/2;
printf("%.10lf %.10lf
",r*r*pi,R*R*pi);
}
signed main()
{
int T;
cin>>T;
while (T--)
{
solve();
}
}