#![allow(unused_imports)]
#![allow(non_snake_case)]
use std::cmp::*;
use std::collections::*;
use std::io::Write;

#[allow(unused_macros)]
macro_rules! debug {
    ($($e:expr),*) => {
        #[cfg(debug_assertions)]
        $({
            let (e, mut err) = (stringify!($e), std::io::stderr());
            writeln!(err, "{} = {:?}", e, $e).unwrap()
        })*
    };
}

fn main() {
    let n = read::<usize>();
    let mut r_points = vec![];
    let mut l_points = vec![];
    let mut d_points = vec![];
    let mut u_points = vec![];
    for i in 0..n {
        let v = read_vec::<String>();
        let x = v[0].clone().parse::<f64>().unwrap();
        let y = v[1].clone().parse::<f64>().unwrap();
        if &v[2] == "R" {
            r_points.push((x, y));
        } else if &v[2] == "L" {
            l_points.push((x, y));
        } else if &v[2] == "D" {
            d_points.push((x, y));
        } else if &v[2] == "U" {
            u_points.push((x, y));
        }
    }

    let mut lr_events = vec![0.0];
    for _ in 0..2 {
        if !l_points.is_empty() && !r_points.is_empty() {
            let most_left_r = r_points.iter().map(|&x| Total(x.0)).min().unwrap().0;
            let most_right_l = l_points.iter().map(|&x| Total(x.0)).max().unwrap().0;
            if most_left_r < most_right_l {
                lr_events.push((most_right_l - most_left_r) / 2.0f64);
            }
        }
        let mut ud_points = u_points.clone();
        ud_points.append(&mut d_points.clone());
        if !l_points.is_empty() && !ud_points.is_empty() {
            let most_right_l = l_points.iter().map(|&x| Total(x.0)).max().unwrap().0;
            let most_left_ud = ud_points.iter().map(|&x| Total(x.0)).min().unwrap().0;
            let most_right_ud = ud_points.iter().map(|&x| Total(x.0)).max().unwrap().0;
            if most_right_l > most_left_ud {
                lr_events.push(most_right_l - most_left_ud);
            }
            if most_right_l > most_right_ud {
                lr_events.push(most_right_l - most_right_ud);
            }
        }
        if !r_points.is_empty() && !ud_points.is_empty() {
            let most_left_r = r_points.iter().map(|&x| Total(x.0)).min().unwrap().0;
            let most_left_ud = ud_points.iter().map(|&x| Total(x.0)).min().unwrap().0;
            let most_right_ud = ud_points.iter().map(|&x| Total(x.0)).max().unwrap().0;
            if most_left_r < most_left_ud {
                lr_events.push(most_left_ud - most_left_r);
            }
            if most_left_r < most_right_ud {
                lr_events.push(most_right_ud - most_left_r);
            }
        }
        std::mem::swap(&mut l_points, &mut d_points);
        std::mem::swap(&mut r_points, &mut u_points);
    }
    lr_events.sort_by_key(|&x| Total(x));
    lr_events.dedup();

    let mut lr_points = l_points.clone();
    lr_points.append(&mut r_points.clone());
    let lr_most_u = lr_points.iter().map(|&x| Total(x.1)).max();
    let lr_most_d = lr_points.iter().map(|&x| Total(x.1)).min();
    let mut ud_points = u_points.clone();
    ud_points.append(&mut d_points.clone());
    let ud_most_r = ud_points.iter().map(|&x| Total(x.0)).max();
    let ud_most_l = ud_points.iter().map(|&x| Total(x.0)).min();

    let l_most_l = l_points.iter().map(|&x| Total(x.0)).min();
    let l_most_r = l_points.iter().map(|&x| Total(x.0)).max();
    let r_most_l = r_points.iter().map(|&x| Total(x.0)).min();
    let r_most_r = r_points.iter().map(|&x| Total(x.0)).max();

    let u_most_d = u_points.iter().map(|&x| Total(x.1)).min();
    let u_most_u = u_points.iter().map(|&x| Total(x.1)).max();
    let d_most_d = d_points.iter().map(|&x| Total(x.1)).min();
    let d_most_u = d_points.iter().map(|&x| Total(x.1)).max();

    let calc_area = |t: f64| -> f64 {
        let mut most_left = std::f64::MAX;
        let mut most_right = -std::f64::MAX;
        let mut most_down = std::f64::MAX;
        let mut most_up = -std::f64::MAX;
        if let Some(x) = &lr_most_u {
            most_up = x.0;
        }
        if let Some(x) = &lr_most_d {
            most_down = x.0;
        }
        if let Some(x) = &ud_most_l {
            most_left = x.0;
        }
        if let Some(x) = &ud_most_r {
            most_right = x.0;
        }
        if let Some(x) = &l_most_l {
            let x = x.0 - t;
            most_left = f64::min(x, most_left);
        }
        if let Some(x) = &l_most_r {
            let x = x.0 - t;
            most_right = f64::max(x, most_right);
        }
        if let Some(x) = &r_most_l {
            let x = x.0 + t;
            most_left = f64::min(x, most_left);
        }
        if let Some(x) = &r_most_r {
            let x = x.0 + t;
            most_right = f64::max(x, most_right);
        }

        if let Some(x) = &u_most_u {
            let x = x.0 + t;
            most_up = f64::max(x, most_up);
        }
        if let Some(x) = &u_most_d {
            let x = x.0 + t;
            most_down = f64::min(x, most_down);
        }

        if let Some(x) = &d_most_u {
            let x = x.0 - t;
            most_up = f64::max(x, most_up);
        }
        if let Some(x) = &d_most_d {
            let x = x.0 - t;
            most_down = f64::min(x, most_down);
        }

        (most_right - most_left) * (most_up - most_down)
    };

    let mut ans = std::f64::MAX;
    for &t in &lr_events {
        ans = f64::min(ans, calc_area(t));
    }
    for i in 0..lr_events.len() - 1 {
        let mid = ternary_search(lr_events[i], lr_events[i + 1], calc_area);
        ans = f64::min(ans, calc_area(mid));
    }
    println!("{}", ans);
}

fn ternary_search<F>(lb: f64, ub: f64, criterion: F) -> f64
where
    F: Fn(f64) -> f64,
{
    let offset = lb;
    let mut lb = 0.0;
    let mut ub = ub - offset;
    let mid = (lb + ub) / 2.0;
    let mut convex_upward = false;
    if criterion(mid + offset) > (criterion(lb + offset) + criterion(ub + offset)) / 2.0 {
        convex_upward = true;
    }
    while ub - lb > 0.00000003 {
        let mid1 = (ub + lb * 2.0) / 3.0;
        let mid2 = (ub * 2.0 + lb) / 3.0;
        if convex_upward {
            if criterion(mid1 + offset) < criterion(mid2 + offset) {
                lb = mid1;
            } else {
                ub = mid2;
            }
        } else {
            if criterion(mid1 + offset) > criterion(mid2 + offset) {
                lb = mid1;
            } else {
                ub = mid2;
            }
        }
    }
    (lb + ub) / 2.0 + offset
}

fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}

fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}

#[derive(PartialEq, PartialOrd)]
pub struct Total<T>(pub T);

impl<T: PartialEq> Eq for Total<T> {}

impl<T: PartialOrd> Ord for Total<T> {
    fn cmp(&self, other: &Total<T>) -> std::cmp::Ordering {
        self.0.partial_cmp(&other.0).unwrap()
    }
}


Measured memory_bytes: 6712