import Data.Functor
import Data.List
import Data.Bool

main :: IO()
main = getLine >> getContents >>= mapM_ (putStrLn . (bool "NO" "YES")  . f . sort) . (mapMap read . wordsLines)
    where f [a, b, c] = a ^ 2 + b ^ 2 == c ^ 2

wordsLines :: String -> [[String]]
wordsLines = map words . lines

mapMap :: (a -> b) -> [[a]] -> [[b]]
mapMap f = map (map f)
