import java.util.Scanner; public class Main_yukicoder105 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); for (int tcase = 0; tcase < t; tcase++) { double ret = 0; for (int i = 0; i < 6; i++) { double x = sc.nextDouble(); double y = sc.nextDouble(); double tmp = Math.atan2(y, x) / Math.PI * 180; if (tmp >= 0 && tmp <= 50) { ret = tmp; } } System.out.printf("%.7f\n", ret); } sc.close(); } }