import           System.IO
import           Control.Monad
import           Control.Applicative
import           Control.Monad.State
import           Data.List

calc :: [Int] -> String
calc (a : b : c : _) | a ^ 2 + b ^ 2 == c ^ 2 = "YES"
                     | otherwise              = "NO"

main = do
  n     <- readLn
  lines <- replicateM n getLine
  mapM (putStrLn . calc . sort . (map read) . words) lines

