#include using namespace std; #define REP(i,n) for(int i=0; i<(int)(n); i++) const double PI = acos(-1); const double EPS = 1e-3; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int T; cin >> T; while (T--) { double ret; REP (i, 6) { double x, y; cin >> x >> y; double theta = atan2(y, x); double tmp = 180 * theta / PI; if (0-EPS <= tmp && tmp <= 50+EPS) ret = tmp; } cout << fixed << setprecision(12) << ret << endl; } return 0; }