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