is_triangle a b c = (a^2 == b^2 + c^2) || (b^2 == a^2 + c^2) || (c^2 == a^2 + b^2)

main = do
     n_str <- getLine
     let n = read n_str::Int
     rs <- sequence $ [fmap words getLine | x <- [1..n]]
     let rsint = [map (read::String->Int) r | r <- rs]
     mapM putStrLn [if is_triangle (r!!0) (r!!1) (r!!2) then "YES" else "NO" | r <- rsint]