import Data.List  -- sort

isRightTriangle sides = a * a + b * b == c * c
        where [a,b,c] = sort sides

main = do { n <- readLn ; main' n }
main' 0 = return ()
main' n = do s <- getLine
             printYN . isRightTriangle . map read . words $ s
             main' (n - 1)

printYN cond = putStrLn (if cond then "YES" else "NO")