#include #include #include using namespace atcoder; using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 1000000 int main(){ vector> p = { make_pair(-0.5000000000001114,0.8660254037853874), make_pair(0.5000000000008891 ,-0.8660254037846875), make_pair(-0.9999999999992328 ,0.0000000000005249), make_pair(-0.5000000000002304 ,-0.8660254037850550), make_pair(0.4999999999997271 ,0.8660254037847375), make_pair(0.9999999999999735, 0.0000000000000955) }; double eps = 1e-9; int _t; cin>>_t; rep(_,_t){ //sort(p.begin(),p.end()); vector> pp(6); rep(i,6)cin>>pp[i].first>>pp[i].second; double ans = 1e100; double temp = atan2(pp[0].second,pp[0].first); rep(i,6){ double t2 = atan2(p[i].second,p[i].first); t2 = temp - t2; while(t2<-eps)t2 += acos(-1.0)*2.0; ans = min(ans,t2); } ans = 360.0 * ans / (acos(-1.0)*2.0); cout<