import Data.List

main = do
  line <- getLine
  contents <- getContents
  let
    n = read line :: Int
    nums = map sort [ map read $ words l | l <- (take n $ lines contents)]
    result = map (\x -> if is_right_triangle x then "YES" else "NO") nums

  mapM_ print result

is_right_triangle [a, b, c] = a*a + b*b == c*c