import           Control.Applicative
import           Control.Monad
import           Data.List

main :: IO ()
main =  do
  n <- getLine
  triangles <- replicateM (read n) getLine
  mapM_ (putStrLn . test . map read . words) triangles
    where
      test [a,b,c]
        | a^2 + b^2 == c^2 || b^2 + c^2 == a^2 || a^2 + c^2 == b^2 = "YES"
        | otherwise = "NO"
