import Data.List      -- sort
import Control.Monad  -- replicateM

isRightTriangle sides = a * a + b * b == c * c
        where [a,b,c] = sort sides

main  = do { n <- readLn ; replicateM n main' }
main' = do s <- getLine
           printYN . isRightTriangle . map read . words $ s

printYN y = putStrLn $ if y then "YES" else "NO"