n = gets
while line = gets do
    a=Array.new(3) { |i|  }
    a[0],a[1],a[2] = line.split.map(&:to_i)
    a=a.sort
    puts a
    if a[2]**2==a[1]**2+a[0]**2 then
        puts 'YES'
    else
        puts 'NO'
    end
end