def func (arr)
    arr=arr.sort
  #  STDOUT.puts arr
    if arr[0].to_i ** 2 + arr[1].to_i ** 2 == arr[2].to_i ** 2 then
      return "YES"
    else
      return "NO"
    end
  end
 
  count = 0
  num = STDIN.gets.to_i
  while count < num do
    count+=1
    i = STDIN.gets
    arr=i.split
    STDOUT.puts func(arr)
  end