import Control.Applicative ((<$>))
import Control.Monad (replicateM)
import Data.List (sort)

main :: IO ()
main = do
  n <- readLn
  es <- replicateM n (map read <$> words <$> getLine) :: IO [[Int]]
  putStr $ unlines $ map orth es

orth :: [Int] -> String
orth = (\xs -> if (xs!!2)^2 == (xs!!0)^2 + (xs!!1)^2 then "YES" else "NO") . sort