#![allow(unused_imports)]
#![allow(unused_macros)]
use itertools::Itertools;
use std::cmp::{max, min};
use std::collections::*;
use std::i64;
use std::io::{stdin, Read};
use std::usize;

trait ChMinMax {
    fn chmin(&mut self, other: Self);
    fn chmax(&mut self, other: Self);
}
impl<T> ChMinMax for T
where
    T: PartialOrd,
{
    fn chmin(&mut self, other: Self) {
        if *self > other {
            *self = other
        }
    }
    fn chmax(&mut self, other: Self) {
        if *self < other {
            *self = other
        }
    }
}

#[allow(unused_macros)]
macro_rules! parse {
    ($it: ident ) => {};
    ($it: ident, ) => {};
    ($it: ident, $var:ident : $t:tt $($r:tt)*) => {
        let $var = parse_val!($it, $t);
        parse!($it $($r)*);
    };
    ($it: ident, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $var = parse_val!($it, $t);
        parse!($it $($r)*);
    };
    ($it: ident, $var:ident $($r:tt)*) => {
        let $var = parse_val!($it, usize);
        parse!($it $($r)*);
    };
}

#[allow(unused_macros)]
macro_rules! parse_val {
    ($it: ident, [$t:tt; $len:expr]) => {
        (0..$len).map(|_| parse_val!($it, $t)).collect::<Vec<_>>();
    };
    ($it: ident, ($($t: tt),*)) => {
        ($(parse_val!($it, $t)),*)
    };
    ($it: ident, u1) => {
        $it.next().unwrap().parse::<usize>().unwrap() -1
    };
    ($it: ident, $t: ty) => {
        $it.next().unwrap().parse::<$t>().unwrap()
    };
}

fn f(xs: &[(i64, i64)], ys: &[(i64, i64)], t: i64) -> i64 {
    use std::i64::{MAX, MIN};
    let mut xmax = MIN;
    let mut xmin = MAX;
    let mut ymax = MIN;
    let mut ymin = MAX;
    for &(xi, d) in xs {
        let x = xi + t * d;
        xmax.chmax(x);
        xmin.chmin(x);
    }
    for &(yi, d) in ys {
        let y = yi + t * d;
        ymax.chmax(y);
        ymin.chmin(y);
    }
    (xmax - xmin) * (ymax - ymin)
}

fn solve(s: &str) {
    let mut it = s.split_whitespace();
    parse!(it, n: usize);
    let mut xs = vec![];
    let mut ys = vec![];
    for _ in 0..n {
        parse!(it, x: i64, y: i64, d: char);
        let x = 2 * x;
        let y = 2 * y;
        match d {
            'R' => {
                xs.push((x, 1));
                ys.push((y, 0))
            }
            'L' => {
                xs.push((x, -1));
                ys.push((y, 0))
            }
            'U' => {
                xs.push((x, 0));
                ys.push((y, 1))
            }
            'D' => {
                xs.push((x, 0));
                ys.push((y, -1))
            }
            _ => (),
        }
    }
    let mut l = 0;
    let mut r = 1_000_000_000;
    while r - l > 3 {
        let ml = (2 * l + r) / 3;
        let mr = (l + 2 * r) / 3;
        if f(&xs, &ys, ml) > f(&xs, &ys, mr) {
            l = ml;
        } else {
            r = mr;
        }
    }
    let mut ret = std::i64::MAX;
    for i in l..=r {
        ret.chmin(f(&xs, &ys, i));
    }
    println!("{}", ret as f64 / 4.);
}

fn main() {
    let mut s = String::new();
    stdin().read_to_string(&mut s).unwrap();
    solve(&s);
}

#[cfg(test)]
mod tests {
    use super::*;
    #[test]
    fn test_input() {
        let s = "
        ";
        solve(s);
    }
}


Measured memory_bytes: 7548