sum = 0

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