#!/usr/local/bin/ruby
n=gets.to_i
rec=Array.new
ans=Array.new
n.times{
   rec=gets.split(" ").map(&:to_i)
   rec.sort!{|a,b| a <=> b}
   x,y,z=rec[0],rec[1],rec[2]
   a=x*x+y*y
   b=z*z
   if a==b
   puts"YES"
   else
      puts"NO"
   end
}