import Control.Applicative
import Control.Monad
main = do
  n <- readLn
  xs <- replicateM n getLine
  mapM_ putStrLn $ map solve (map (map read . words) xs)

solve :: [Int] -> String
solve xs = if a == b-a then "YES" else "NO"
  where a = (maximum xs) ^ 2; b = sum $ map (^2) xs
