import Control.Monad
import Data.List

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