#!/usr/bin/ruby
# -*- coding: utf-8 -*-
=begin
Volume0-0003
=end
def righttriangle(a,b,c)
  f = [a,b,c]
  mx = f.max
  f.delete_at(f.index(mx))
  f.inject(0){|acc,x| acc + x*x} == mx * mx
end

class Main
  def initialize
    fh=STDIN
    n = fh.gets.to_i
    while fh.gets do
      a,b,c = $_.split.map{|x| x.to_i}
      puts righttriangle(a,b,c) ? "YES" : "NO" 
    end
  end

end

if $0 == __FILE__ then
  Main.new
end