import Control.Applicative
import Control.Monad

main :: IO ()
main = do
  [n] <- getInts
  ns <- replicateM n getInts
  mapM_ (putStrLn.solve) ns

getInts :: IO [Int]
getInts = map read . words <$> getLine

solve :: [Int] -> String
solve (x:y:z:_) = if c1 || c2 || c3
                then "YES"
                else "NO"
  where
    c1 = x*x +  y*y == z*z
    c2 = y*y + z*z == x*x
    c3 = z*z + x*x == y*y
solve _ = ""