j = []
m = gets.to_i
m.times{|i|
    a,b,c = gets.split.map(&:to_i).sort!
    if a**2 + b**2 == c**2
        h = "YES"
        j << h
    else
        d = "NO"
        j << d
    end
}
m.times{|i|
   puts j[i] 
}
