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

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

main :: IO ()
main = do
    n <- readLn
    replicateM_ n $ do
        [a,b,c] <- sort . map read . words <$> getLine
        putStrLn $ if c^2 == a^2 + b^2 then "YES" else "NO"