#include #include int main() { double x, y, t; int n; scanf("%d", &n); while (n--) { scanf("%lf%lf", &x, &y); t = atan2(y, x) / atan(1) * 45 + 180; while (t > 51) t -= 60; for (int i = 0; i < 5; i++) scanf("%*lf%*lf"); printf("%f\n", t); } return 0; }