import Data.List (permutations)
import Control.Monad (replicateM)

isTriangle [a,b,c]
  | any isTriangle' (permutations [a,b,c]) = "YES"
  | otherwise                             = "NO"
    where
      isTriangle' [x,y,z] = (read x)^2 + (read y)^2 == (read z)^2

main = do
  s  <- getContents
  putStr $ unlines $ map isTriangle $ map words $ tail $ lines s