let () =
  let is_right l =
    match l with
      [a;b;c] -> if a*a + b*b = c*c then "YES" else "NO"
    | _ -> "NO" and
      n = read_int () in
  let rec read i =
    let line = Scanf.scanf "%d %d %d\n" (fun x y z-> [x;y;z] ) |> List.sort compare in
    is_right line |> print_endline;if i > 0 then read (i-1)
  in read (n-1);;