import Control.Monad (replicateM_)

main = do
    count <- fmap read $ getLine :: IO (Int)
    replicateM_ count sub
    where
    sub = do
        line <- getLine
        let
            [a,b,c] = map read $ words line :: [Int]
        if isRightTriangle a b c
            then putStrLn "YES"
            else putStrLn "NO"

isRightTriangle :: Int -> Int -> Int -> Bool
isRightTriangle a b c = or [a*a+b*b==c*c, b*b+c*c==a*a, c*c+a*a==b*b]