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

main :: IO ()
main = do
    n <- read <$> getLine
    ls <- map (map read . words) <$> replicateM n getLine
    mapM_ putStrLn $ solve ls

solve :: [[Int]] -> [String]
solve [] = []
solve (x:xs) = (isRT $ sort x):(solve xs)
    where
        isRT :: [Int] -> String
        isRT [a,b,c] = if a^2 + b^2 == c^2
                           then "YES"
                           else "NO"