#include using namespace std; using i64 = int64_t; using vi = vector; using vvi = vector; void solve() { double ans = 60; double X = -1, Y = -1; for (int i = 0; i < 6; i++) { double x, y; cin >> x >> y; if (x > 0.5 - 1e-11 && -1e-11 < y && y < 1) { X = x, Y = y; ans = min(ans, abs(atan(Y / X) * 180 / acos(-1))); } } assert(X != -1 && Y != -1 && ans < 50); cout << ans << endl; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); cout.setf(ios::fixed); cout.precision(10); int t; cin >> t; while (t--) { solve(); } }