let _ =
  let n = Scanf.scanf "%d\n" (fun x -> x) in
  let is_triangle (x, y, z) =
    if x >= y && x >= z then
      if x * x = y * y + z * z then "YES" else "NO"
    else
      if y >= x && y >= z then
        if y * y = x * x + z * z then "YES" else "NO"
      else
        if z * z = x * x + y * y then "YES" else "NO" in
  for i = 1 to n do
    let a, b, c = Scanf.scanf "%d %d %d\n" (fun x y z -> (x,y,z)) in
    print_endline @@ is_triangle (a, b, c)
  done