#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using vs = vector<string>;
using pll = pair<ll, ll>;
using vp = vector<pll>;
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define repr(i, a, b) for (ll i = (a); i < (b); i++)
#define ALL(a) (a).begin(), (a).end()
#define SZ(x) ((int)(x).size())
#define PRINT(V) for (auto v:(V)) {cerr << v << " ";} cerr << endl
#define dump(x) cerr << #x << " : " << (x) << endl
#define dump2(x, y) cerr << "(" << #x << ", " << #y << ") = (" << x << ", " << y << ")" << endl
inline ll GCD(ll a, ll b){return b ? GCD(b, a % b) : a;}
const ll MOD = 1000000007;
const ll INF = 1000000000000000000LL;
/* END OF TEMPLATE */

int main(){
    cin.tie(0); ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    ll n;
    cin >> n;
    vll xr, yr;
    vll xl, yl;
    vll xu, yu;
    vll xd, yd;
    rep(i, n){
        ll x, y;
        char d;
        cin >> x >> y >> d;
        if(d == 'R'){
            xr.emplace_back(x);
            yr.emplace_back(y);
        }
        if(d == 'L'){
            xl.emplace_back(x);
            yl.emplace_back(y);
        }
        if(d == 'U'){
            xu.emplace_back(x);
            yu.emplace_back(y);
        }
        if(d == 'D'){
            xd.emplace_back(x);
            yd.emplace_back(y);
        }
    }
    if(SZ(xr) >= 2){
        xr = {*min_element(ALL(xr)), *max_element(ALL(xr))};
        yr = {*min_element(ALL(yr)), *max_element(ALL(yr))};
    }
    if(SZ(xl) >= 2){
        xl = {*min_element(ALL(xl)), *max_element(ALL(xl))};
        yl = {*min_element(ALL(yl)), *max_element(ALL(yl))};
    }
    if(SZ(xu) >= 2){
        xu = {*min_element(ALL(xu)), *max_element(ALL(xu))};
        yu = {*min_element(ALL(yu)), *max_element(ALL(yu))};
    }
    if(SZ(xd) >= 2){
        xd = {*min_element(ALL(xd)), *max_element(ALL(xd))};
        yd = {*min_element(ALL(yd)), *max_element(ALL(yd))};
    }
    ll sr = SZ(xr);
    ll sl = SZ(xl);
    ll su = SZ(xu);
    ll sd = SZ(xd);
    
    vector<double> t;
    t.emplace_back(0.0);
    rep(i, sr)rep(j, sl){
        t.emplace_back((xl[j]-xr[i])/2.0);
    }
    rep(i, sr)rep(j, su){
        t.emplace_back(xu[j]-xr[i]);
        t.emplace_back(yr[i]-yu[j]);
    }
    rep(i, sr)rep(j, sd){
        t.emplace_back(xd[j]-xr[i]);
        t.emplace_back(yd[j]-yr[i]);
    }
    rep(i, sl)rep(j, su){
        t.emplace_back(xl[i]-xu[j]);
        t.emplace_back(yl[i]-yu[j]);
    }
    rep(i, sl)rep(j, sd){
        t.emplace_back(xl[i]-xd[j]);
        t.emplace_back(yd[j]-yl[i]);
    }
    rep(i, su)rep(j, sd){
        t.emplace_back((yd[j]-yu[i])/2.0);
    }
    
    double ans = INF;
    double xmin, xmax, ymin, ymax;
    for(auto&& i : t){
        if(i < -0.25) continue;
        xmin = ymin = -INF;
        xmax = ymax = INF;
        rep(j, sr){
            if(xr[j]+i > xmin) xmin = xr[j]+i;
            if(xr[j]+i < xmax) xmax = xr[j]+i;
            if(yr[j]   > ymin) ymin = yr[j];
            if(yr[j]   < ymax) ymax = yr[j];
        }
        rep(j, sl){
            if(xl[j]-i > xmin) xmin = xl[j]-i;
            if(xl[j]-i < xmax) xmax = xl[j]-i;
            if(yl[j]   > ymin) ymin = yl[j];
            if(yl[j]   < ymax) ymax = yl[j];
        }
        rep(j, su){
            if(xu[j]   > xmin) xmin = xu[j];
            if(xu[j]   < xmax) xmax = xu[j];
            if(yu[j]+i > ymin) ymin = yu[j]+i;
            if(yu[j]+i < ymax) ymax = yu[j]+i;
        }
        rep(j, sd){
            if(xd[j]   > xmin) xmin = xd[j];
            if(xd[j]   < xmax) xmax = xd[j];
            if(yd[j]-i > ymin) ymin = yd[j]-i;
            if(yd[j]-i < ymax) ymax = yd[j]-i;
        }
        if(ans > (xmax-xmin)*(ymax-ymin)) ans = (xmax-xmin)*(ymax-ymin);
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 2256