For this Question: 4 friends are playing Make Believe Agents. You have 4 chairs fixed to the ground. 

Now, you want to draw a square outline such that all the chairs are inside the square. This square will be the secret base. Now each of the "Agent" wants a favourite side of the square. A side is favourite if it is exactly 13 units aways from the Agent's chair and it is the nearest side among the 4 sides of square from the Agent.

To avoid internal fights no two agents should have same favourite side. You have to find the side length of the biggest room that satisfies all the above conditions or report -1 if it is not possible.First line of input contains T, denoting number of test cases.
Next T lines contain 8 integers denoting x1, y1, x2, y2, x3, y3, x4, and y4.

Constraints:
1 <= T <= 100
-100 <= xi, yi <= 100
All the four (x, y) coordinates are distinct.For each test case, print the side length of the biggest room that satisfies all the above conditions or report -1 if it is not possible.
Output <b>must</b> be rounded to two digits after the decimal.

Make sure to print the same format as in the sample.Sample Input
2
0 1 2 5 5 4 3 0
10 10 30 30 20 20 0 10

Sample Output
31.00
-1, I have written this Solution Code: #pragma GCC optimize ("Ofast")
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define VV vector
#define pb push_back
#define bitc  __builtin_popcountll
#define m_p make_pair
#define infi 1e18+1
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);
string char_to_str(char c){string tem(1,c);return tem;}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template<class T>//usage rand<long long>()
T rand() {
    return uniform_int_distribution<T>()(rng);
}
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;

template<class T>
using oset = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
// string to integer stoi()
// string to long long stoll()
// string.substr(position,length);
// integer to string to_string();
 
//////////////
auto clk=clock();
#define all(x) x.begin(),x.end()
#define S second
#define F first
#define sz(x) ((long long)x.size())
// #define int long long  
#define f80 __float128
#define pii pair<int,int>
#define rep(i,n) for (int i=0; i<(n); i++)
///////////// 
#define eps 1e-11
#define bs 1000000007
#define bsize 256
#define MAGIC 113
 
using namespace std;
 
int tests;
long double sx[10],sy[10],qx[10],qy[10];
 
long double eval(long double ang)
{
    for (int i=0;i<4;i++)
    {
        qx[i]=sx[i]*cos(ang)-sy[i]*sin(ang);
        qy[i]=sx[i]*sin(ang)+sy[i]*cos(ang);
    }
    long double minx,maxx,miny,maxy;
    minx=miny=1e9;
    maxx=maxy=-1e9;
    
    for (int i=0;i<4;i++)
    {
        minx=min(minx,qx[i]);
        maxx=max(maxx,qx[i]);
        miny=min(miny,qy[i]);
        maxy=max(maxy,qy[i]);
    }
    return fabs(maxx+-maxy-minx+miny);
}
 
long double get(long double ang)
{
    for (int i=0;i<4;i++)
    {
        qx[i]=sx[i]*cos(ang)-sy[i]*sin(ang);
        qy[i]=sx[i]*sin(ang)+sy[i]*cos(ang);
    }
    long double minx,maxx,miny,maxy;
    minx=miny=1e9;
    maxx=maxy=-1e9;
    
    for (int i=0;i<4;i++)
    {
        minx=min(minx,qx[i]);
        maxx=max(maxx,qx[i]);
        miny=min(miny,qy[i]);
        maxy=max(maxy,qy[i]);
    }
    
    for (int i=0;i<4;i++)
    {
        int cnt=0;
        if (fabs(qx[i]-minx)<eps)cnt++;
        if (fabs(qx[i]-maxx)<eps)++cnt;
        if (fabs(qy[i]-miny)<eps)++cnt;
        if (fabs(qy[i]-maxy)<eps)++cnt;
        if (cnt!=1)
            return -1;
    }
    return maxx-minx+10;
}
 
long double solve()
{
    long double ans=-1e9;
    
    long double one=M_PI/2/MAGIC;
    for (int P=0;P<MAGIC;P++)
    {
        long double l,r;
        l=P*one;
        r=(P+1)*one;
        for (int iter=1;iter<=100;iter++)
        {
            double mid1,mid2;
            mid1=l*2+r;
            mid2=l+r*2;
            mid1/=3;
            mid2/=3;
            long double val1=eval(mid1);
            long double val2=eval(mid2);
            if (val1<=val2)r=mid2;
            else l=mid1;
        }
    //  cout<<eval(l)<<endl;
        long double val=eval(l);
        if (val<eps)
        {
            ans=max(ans,get(l));
        }
    }
    
    for (int P=0;P<MAGIC;P++)
    {
        long double l,r;
        l=P*one;
        r=(P+1)*one;
        for (int iter=1;iter<=100;iter++)
        {
            long double mid1,mid2;
            mid1=l*2+r;
            mid2=l+r*2;
            mid1/=3;
            mid2/=3;
            long double val1=eval(mid1);
            long double val2=eval(mid2);
            if (val1>=val2)r=mid2;
            else l=mid1;
        }
        
        //cout<<eval(l)<<endl;
        //cin.get();
        double val=eval(l);
        if (val<eps)
        {
            ans=max(ans,get(l));
        }
    }
    return ans;
}
int main(){
ios_base::sync_with_stdio(0);
#ifdef ANIKET_GOYAL
	freopen("inputf.in","r",stdin);
	freopen("outputf.in","w",stdout);
#endif
cin>>tests;
for (;tests;--tests)
{
    for (int i=0;i<4;i++)
    {
        cin>>sx[i]>>sy[i];
    }
    long double ans=solve();
    cout.precision(2);
    if (ans<0)cout<<"-1"<<endl;
    else cout<<fixed<<ans+16<<endl;
}
#ifdef ANIKET_GOYAL
	cout<<endl<<endl<<endl<<endl<<"Time elapsed: "<<(double)(clock()-clk)/CLOCKS_PER_SEC<<endl;
#endif
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?