let dir = function "R" -> 0 | "U" -> 1 | "L" -> 2 | _ -> 3
let foi = float_of_int
let () =
  Scanf.scanf "%d" @@ fun n ->
  let xyd = Array.init n (fun _ -> Scanf.scanf " %d %d %s" @@ fun x y d -> x, y, dir d) in
  let calc1 d =
    let fld, v0, g =
      if d < 2 then max, min_int, (fun x -> x)
      else          min, max_int, (fun x -> -x)
    in
    let c = Array.fold_left (fun v (x,y,d') ->
      if (d-d'+4) mod 2 = 1 then fld v (if d mod 2 = 0 then y else x) else v
    ) v0 xyd
    in
    let i = Array.fold_left (fun v (x,y,d') ->
      if d = d' then fld v (if d mod 2 = 0 then x else y) else v
    ) v0 xyd in
    let r = Array.fold_left (fun v (x,y,d') ->
      if (d-d'+4) mod 4 = 2 then fld v (if d mod 2 = 0 then x else y) else v
    ) v0 xyd
    in
    [ 2 * g (r - c);
      2 * g (c - i);
      g (r - i); ]
  in
  let calc2 t =
    let xmin, xmax, ymin, ymax =
      Array.fold_left (fun (xmin, xmax, ymin, ymax) (x,y,d) ->
        let x, y = foi x, foi y in
        let x, y = match d with
          | 0 -> x +. t, y
          | 1 -> x,      y +. t
          | 2 -> x -. t, y
          | _ -> x,      y -. t
        in
        min xmin x, max xmax x, min ymin y, max ymax y) (1e30, -.1e30, 1e30, -.1e30) xyd
    in
    (xmax -. xmin) *. (ymax -. ymin)
  in
  List.concat [calc1 0; calc1 1; calc1 2; calc1 3; ]
  |> List.filter (fun x -> 0 <= x && x <= 100000)
  |> List.sort_uniq (-)
  |> List.fold_left (fun v t -> min v (calc2 (foi t /. 2.0))) max_float
  |> Printf.printf "%.10f\n"