class A def initialize t = gets.chomp.to_i t.times do str = gets.chomp eps = 1.0e-6 6.times do x, y = gets.chomp.split(' ').map(&:to_f) arc = Math.atan(y/x) * 180 / Math::PI if x >= -eps && y >= -eps && arc.between?(0-eps,50+eps) puts arc end end end end end A.new