package main import ( "bufio" "fmt" "math" "os" "strconv" ) var sc = bufio.NewScanner(os.Stdin) var rdr = bufio.NewReaderSize(os.Stdin, 1000000) func main() { sc.Split(bufio.ScanWords) t := nextInt() for i := 0; i < t; i++ { for j := 0; j < 6; j++ { x, y := nextFloat(), nextFloat() x, y = float64(int(x*1e12)), float64(int(y*1e12)) x, y = x/1e12, y/1e12 angleX := math.Acos(x) * 180 / math.Pi angleY := math.Asin(y) * 180 / math.Pi if angleX-angleY < 1 && angleX < 50 { if 1e-4 > angleX { fmt.Println(0) continue } fmt.Println(angleX) } } } } func nextLine() string { sc.Scan() return sc.Text() } func nextInt() int { i, _ := strconv.Atoi(nextLine()) return i } func nextFloat() float64 { f, _ := strconv.ParseFloat(nextLine(), 64) return f }