import sequtils,strutils,complex,math var T = stdin.readline.parseInt x,y : float64 p : Complex n : string for t in 1..T: var d : float = 1 n = stdin.readline for i in 0..5: (x,y) = stdin.readline.split.map(parsefloat) p = (x,y) var Ph = phase(p) if Ph > -0.0000000001: d = min(d, Ph) echo formatFloat(d / PI * 180, ffDecimal, 14)