import Control.Applicative
import Data.List

--a<=b<=c
isRightTriangle a b c = if c*c == a*a + b*b then "YES" else "NO"

main = do
	n <- getLine
	l <- map sort . map (map (read::String->Int)) . map words . lines <$> getContents
	let l2 = [ isRightTriangle (t!!0) (t!!1) (t!!2) | t<-l ]
	putStrLn $ show l2