num = gets.to_i

datas = []
num.times do
    datas << gets
end

datas.each do |data|
    a, b, c = data.split(" ").sort!.map(&:to_i)
    if ((a**2) + (b **2)) == (c ** 2)
        puts "YES"
    else
        puts "NO"
    end
end 

