gets.to_i.times do
    side = gets.split.map(&:to_i)
    isRight = false
    0.upto(2) do |i|
        if side[i]**2 + side[(i+1)%3]**2 == side[(i+2)%3]**2 then
            isRight = true
        end
    end
    puts isRight ? "YES" : "NO"
end