import Control.Monad
import Data.List

solve [x, y, z] = if x^2 + y^2 == z^2 then "YES" else "NO"

main = do
    n <- readLn :: IO Int
    rawDataSets <- replicateM n getLine
    let dataSets = (sort . map (map read . words) $ rawDataSets)
        in mapM_ (putStrLn . solve) dataSets