module Main where
 
import Control.Applicative
import Control.Monad
import Data.List
import Data.Array

isRectangle [a,b,c]
  | a * a + b * b == c * c = "YES"
  | b * b + c * c == a * a = "YES"
  | a * a + c * c == b * b = "YES"
  | otherwise = "NO"

main :: IO ()
main = do
    _ <- getLine
    ns <- fmap (fmap (read :: String -> Integer) . words) . lines <$> getContents
    -- ns <- fmap (fmap (read :: String -> Integer) . words) . lines <$> (return "4 3 5\n4 3 6\n8 8 8")
    forM_ [0..length ns-1] $ \i -> do
      putStrLn $ show $ isRectangle (ns!!i)