sum = 0

while n = gets
  a = n.to_i
  while sides = gets
    str_side = sides.split
    int_side = str_side.map(&:to_i)
    int_side.sort!
    if int_side[-1] ** 2 == (int_side[-2] ** 2) + (int_side[-3] ** 2)
      puts "YES"
      sum += 1
      if sum == a
        break
      end
    else
      puts "NO"
      sum += 1
      if sum == a
        break
      end
    end
  end
  break
end