import Data.List
import Data.Char
import Data.Functor
import Control.Monad
import qualified Data.ByteString.Char8 as B

main :: IO()
main = do
  (n:_) <- getInts
  forM_ [1..n] $ \_ -> do
    xs <- getInts
    putStrLn $ if f xs then "YES" else "NO"

f :: [Int] -> Bool
f xs = (a*a)+(b*b)==(c*c)
  where (a:b:c:_) = sort xs

getInts :: IO[Int]
getInts = unfoldr (B.readInt . B.dropWhile isSpace) <$> B.getLine