import Data.List
import Control.Applicative

check :: [Int] -> String
check [a, b, c]
  | a^2 + b^2 == c^2 = "YES"
  | otherwise = "NO"

main = do
  getLine
  triangles <- fmap (sort . fmap read . words) . lines <$> getContents
  mapM_ (putStrLn . check) triangles
