#-*-coding:utf-8*-
#0003.rb

#????´??????\????????????????????????????????????
count = 0
loop = gets.to_i #???????????????????????§??????????????°????±??????????
line = []

for input in loop.times do
  input_line = gets
  lines = input_line.split(" ")
  lines_int = lines.map(&:to_i)
  line = lines_int.sort
  #a^2 + b^2 = c^2 ????????´?§?????§???¢
  triangle_check = line[0] ** 2 + line[1] ** 2 == line[2] ** 2

  #true??????Yes???false??????No?????????
  if triangle_check == true then
    puts "YES"
  else
    puts "NO"
  end

  #??????????????°????????????
  count += 1

  #1000???????¶????????????????????????????
  if count > 1000 then
    puts "????????????1000???????¶????????????????"
    break
  end
  
end