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 x0min = List.fold_left (fun acc (x, _) -> min acc x) max_int lxy in
        let x0max = List.fold_left (fun acc (x, _) -> max acc x) min_int lxy in
        let x1min = List.fold_left (fun acc (x, _) -> min acc x) max_int rxy in
        let x1max = List.fold_left (fun acc (x, _) -> max acc x) min_int rxy in
        let x2min = List.fold_left (fun acc (x, _) -> min acc x) max_int uxy in
        let x2max = List.fold_left (fun acc (x, _) -> max acc x) min_int uxy in
        let x3min = List.fold_left (fun acc (x, _) -> min acc x) max_int dxy in
        let x3max = 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 = List.fold_left (fun acc (_, y) -> min acc y) max_int dxy in
        let y0max = List.fold_left (fun acc (_, y) -> max acc y) min_int dxy in
        let y1min = List.fold_left (fun acc (_, y) -> min acc y) max_int uxy in
        let y1max = List.fold_left (fun acc (_, y) -> max acc y) min_int uxy in
        let y2min = List.fold_left (fun acc (_, y) -> min acc y) max_int lxy in
        let y2max = List.fold_left (fun acc (_, y) -> max acc y) min_int lxy in
        let y3min = List.fold_left (fun acc (_, y) -> min acc y) max_int rxy in
        let y3max = 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 x0max, x1max, x2max = float x0max, float x1max, float x2max in
        let x0min, x1min, x2min = float x0min, float x1min, float x2min in
        let y0max, y1max, y2max = float y0max, float y1max, float y2max in
        let y0min, y1min, y2min = float y0min, float y1min, float y2min in
        let calc t =
            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
            (xmax -. xmin) *. (ymax -. ymin)
        in
        let rec loop l r i =
            if i = 300 then l else
                if calc ((l *. 2. +. r) /. 3.) < calc ((l +. r *. 2.) /. 3.) then
                    loop l ((l +. r *. 2.) /. 3.) (i + 1)
                else
                    loop ((l *. 2. +. r) /. 3.) r (i + 1)
        in
        let t = loop 0. 1e+18 0 in
        Printf.printf "%.11f\n" (calc t)
    in
    main ()