import Data.List (sort)
import Control.Monad
main = do
     n <- readLn
     replicateM n solve
solve = do
      a:b:c:_ <- sort . map read . words <$> getLine
      putStrLn $ if c*c == a * a + b * b
                 then "YES"
                 else "NO"