import Control.Monad
import Control.Applicative
main = do
  n <- (read::String->Int) <$> getLine
  s <- replicateM n getLine
  let v = map (map (read::String->Int) . words) s
  mapM_ (putStrLn . aux ) v

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