import Control.Applicative

square :: Int -> Int
square a = a*a

isRightTriangle :: [Int] -> Bool
isRightTriangle array = do
    if (foldl (\x y->x+(square y)) 0 array) - (square $ maximum array) * 2 == 0 then True else False

loop c = do
    if c /= 0 then do
        ss <- words <$> getLine
        if (isRightTriangle $ map (\x->read x :: Int) ss)  == True then putStrLn "YES" else putStrLn "NO"
        loop (c-1)
    else putStr ""

main = do
    count <- read <$> getLine
    loop count