#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };

    ($next:expr, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, bytes) => {
        read_value!($next, String).into_bytes()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

#[derive(Default, Debug)]
struct Border {
    pl: Option<i64>,
    zr: Option<i64>,
    mi: Option<i64>,
}

use std::cmp::{max, min};

impl Border {
    fn update_max(&mut self, v: i64, sig: i64) {
        if sig > 0 {
            if self.pl.is_none() || self.pl < Some(v) {
                self.pl = Some(v);
            }
        } else if sig == 0 {
            if self.zr.is_none() || self.zr < Some(v) {
                self.zr = Some(v);
            }
        } else if sig < 0 {
            if self.mi.is_none() || self.mi < Some(v) {
                self.mi = Some(v);
            }
        }
    }

    fn update_min(&mut self, v: i64, sig: i64) {
        if sig > 0 {
            if self.pl.is_none() || self.pl > Some(v) {
                self.pl = Some(v);
            }
        } else if sig == 0 {
            if self.zr.is_none() || self.zr > Some(v) {
                self.zr = Some(v);
            }
        } else if sig < 0 {
            if self.mi.is_none() || self.mi > Some(v) {
                self.mi = Some(v);
            }
        }
    }

    fn cur_max(&self, t: i64) -> i64 {
        let mut ret = i64::min_value();

        if let Some(p) = self.pl {
            ret = max(ret, p * 2 + t);
        }
        if let Some(p) = self.zr {
            ret = max(ret, p *2);
        }
        if let Some(p) = self.mi {
            ret = max(ret, p * 2 - t);
        }

        ret
    }

    fn cur_min(&self, t: i64) -> i64 {
        let mut ret = i64::max_value();

        if let Some(p) = self.pl {
            ret = min(ret, p * 2 + t);
        }
        if let Some(p) = self.zr {
            ret = min(ret, p *2);
        }
        if let Some(p) = self.mi {
            ret = min(ret, p * 2 - t);
        }

        ret
    }
}

fn main() {
    input! {
        n: usize,
        xyd: [(i64, i64, chars); n],
    }

    let mut xmax = Border::default();
    let mut xmin = Border::default();
    let mut ymax = Border::default();
    let mut ymin = Border::default();

    for (x, y, d) in xyd {
        let xsig = if d[0] == 'R' {1} else if d[0] == 'L' {-1} else {0};
        let ysig = if d[0] == 'U' {1} else if d[0] == 'D' {-1} else {0};

        xmax.update_max(x, xsig);
        xmin.update_min(x, xsig);
        ymax.update_max(y, ysig);
        ymin.update_min(y, ysig);
    }

    // dbg!(&xmax);
    // dbg!(&xmin);
    // dbg!(&ymax);
    // dbg!(&ymin);

    let mut ans = i64::max_value();

    for t in 0..2 * 1_0000_0000 {
        let cur = (xmax.cur_max(t) - xmin.cur_min(t)) * (ymax.cur_max(t) - ymin.cur_min(t));

        // dbg!(cur);
        ans = min(ans, cur);
    }

    println!("{}", ans as f64 / 4.0);
}


Measured memory_bytes: 8444