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

isRightTrig :: Int -> Int -> Int -> String
isRightTrig a b c = if x * x + y * y == z * z then "YES" else "NO"
    where [x, y, z] = sort [a, b, c]

main :: IO ()
main = do
    n <- (read :: String -> Int) <$> getLine
    rs <- replicateM n ((\[a, b, c] -> isRightTrig a b c) . map read . words <$> getLine)
    putStr $ unlines $ rs