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

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

main = do
    n <- readLn
    replicateM_ n $ do
        lines <- (map (read :: String -> Int) . words) <$> getLine
        if isTriangle $ sort lines
           then putStrLn "YES"
           else putStrLn "NO"