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

main :: IO ()
main = do
  n <- readLn
  abcs <- replicateM n $ sort . map read . words <$> getLine
  forM_ abcs $ \[a, b, c] -> do
    putStrLn $ if solve a b c then "YES" else "NO"

solve :: Int -> Int -> Int -> Bool
solve a b c = a^2 + b^2 == c^2

