/* No.105 arcの六角ボルト - yukicoder http://yukicoder.me/problems/198 */ #include #include #include using namespace std; const double EPS = 1e-12; const double PI = 3.141592653589793238463; int main() { int T; double x[6], y[6]; double t50 = PI * 50 / 180, t; cin >> T; while (T--) { for (int i = 0; i < 6; ++i) { cin >> x[i] >> y[i]; } for (int i = 0; i < 6; ++i) { t = atan2(y[i], x[i]); if (-EPS <= t && t < t50) { break; } } cout << fixed << setprecision(7) << (abs(t) * 180 / PI) << endl; } return 0; }