let () =
    let main () =
        let n = Scanf.sscanf (read_line ()) "%d" (fun n -> n) in
        let xyd = Array.init n (fun _ ->
            Scanf.sscanf (read_line ()) "%d %d %c" (fun x y d -> x, y, d))
        in
        let dxy = Array.fold_left (fun acc (x, y, d) -> if d = 'D' then (x, y) :: acc else acc) [] xyd in
        let uxy = Array.fold_left (fun acc (x, y, d) -> if d = 'U' then (x, y) :: acc else acc) [] xyd in
        let lxy = Array.fold_left (fun acc (x, y, d) -> if d = 'L' then (x, y) :: acc else acc) [] xyd in
        let rxy = Array.fold_left (fun acc (x, y, d) -> if d = 'R' then (x, y) :: acc else acc) [] xyd in
        let max_int = max_int / 4 in
        let min_int = min_int / 4 in
        let x0min = 2 * List.fold_left (fun acc (x, _) -> min acc x) max_int lxy in
        let x0max = 2 * List.fold_left (fun acc (x, _) -> max acc x) min_int lxy in
        let x1min = 2 * List.fold_left (fun acc (x, _) -> min acc x) max_int rxy in
        let x1max = 2 * List.fold_left (fun acc (x, _) -> max acc x) min_int rxy in
        let x2min = 2 * List.fold_left (fun acc (x, _) -> min acc x) max_int uxy in
        let x2max = 2 * List.fold_left (fun acc (x, _) -> max acc x) min_int uxy in
        let x3min = 2 * List.fold_left (fun acc (x, _) -> min acc x) max_int dxy in
        let x3max = 2 * List.fold_left (fun acc (x, _) -> max acc x) min_int dxy in
        let x2min = min x2min x3min in
        let x2max = max x2max x3max in

        let y0min = 2 * List.fold_left (fun acc (_, y) -> min acc y) max_int dxy in
        let y0max = 2 * List.fold_left (fun acc (_, y) -> max acc y) min_int dxy in
        let y1min = 2 * List.fold_left (fun acc (_, y) -> min acc y) max_int uxy in
        let y1max = 2 * List.fold_left (fun acc (_, y) -> max acc y) min_int uxy in
        let y2min = 2 * List.fold_left (fun acc (_, y) -> min acc y) max_int lxy in
        let y2max = 2 * List.fold_left (fun acc (_, y) -> max acc y) min_int lxy in
        let y3min = 2 * List.fold_left (fun acc (_, y) -> min acc y) max_int rxy in
        let y3max = 2 * List.fold_left (fun acc (_, y) -> max acc y) min_int rxy in
        let y2min = min y2min y3min in
        let y2max = max y2max y3max in
        let rec loop t min_area =
            if t = 10000000 then min_area else
                let xmin = min (min (x0min - t) (x1min + t)) x2min in
                let xmax = max (max (x0max - t) (x1max + t)) x2max in
                let ymin = min (min (y0min - t) (y1min + t)) y2min in
                let ymax = max (max (y0max - t) (y1max + t)) y2max in
                loop (t + 1) (min min_area ((xmax - xmin) * (ymax - ymin)))
        in
        let f = float (loop 0 max_int) /. 4.0 in
        Printf.printf "%.9f\n" f
    in
    main ()