(* Is it a Right Triangle? *)
let () =
  let check a b c = if a >= b && a >= c then a * a = b * b + c * c
    else if b >= a && b >= c then b * b = a * a + c * c
    else c * c = a * a + b * b in
  Scanf.scanf "%d\n" @@ fun n ->
  let arr = Array.init n @@ fun _ -> Scanf.scanf "%d %d %d\n" @@ 
    fun a b c -> check a b c in
  Array.iter (fun b -> if b then print_endline "YES" else print_endline "NO") arr
