import Control.Applicative
import Data.List

main = do
  lines <- map (map (read :: String -> Int) . words) . tail . lines <$> getContents
  mapM putStrLn . map (isRight . reverse . sort) $ lines
  where isRight [a, b, c] = if a * a == b * b + c * c then "YES" else "NO"