import Control.Monad
isRt :: [Int] -> String
isRt (a:b:c:_) | a^2 + b^2 == c^2 = "YES"
               | b^2 + c^2 == a^2 = "YES"
               | c^2 + a^2 == b^2 = "YES"
               | otherwise        = "NO"
main = getLine >>= \n -> replicateM (read n) getLine
        >>= return . map (isRt .(map read) . words) >>= mapM_ putStrLn