n = gets.chomp.to_i
length = []

for i in 0...n
        data = gets.chomp.to_s
        length[i] = data.split.map!{|x| x.to_i}.sort!
end

for i in 0...n
        if length[i][0] ** 2 + length[i][1] ** 2 == length[i][2] ** 2
                puts "YES"
        elsif
                puts "NO"
        end
end

