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
ans = Array.new

while count < num do
  i = STDIN.gets
  arr=i.split
  ans[count]=func(arr)
  count += 1
end

ans.each do |a|
  puts a
end