import Control.Applicative
import Control.Monad
import Data.List

main = do
    n <- read<$>getLine
    tris <- map (map read.words)<$>replicateM n getLine
    mapM_ (putStrLn.yesOrNo.isRightTriangle) tris

isRightTriangle list = x^2 + y^2 == z^2
    where [x,y,z] = sort list

yesOrNo x = if x then "YES" else "NO"