{-# OPTIONS_GHC -fno-warn-type-defaults #-}
module Main where

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

main :: IO ()
main = do
    n <- readLn
    xss <- replicateM n $ map read . words <$> getLine :: IO [[Int]]
    forM_ xss $ \xs ->
        let [a,b,c] = sort xs
        in putStrLn $ if c^2 == a^2 + b^2 then "YES" else "NO"