#include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <bitset>
#include <algorithm>
#include <complex>
#include <array>
using namespace std;
 
#define REP(i,n) for(int i=0; i<n; ++i)
#define FOR(i,a,b) for(int i=a; i<=b; ++i)
#define FORR(i,a,b) for (int i=a; i>=b; --i)
#define ALL(c) (c).begin(), (c).end()
 
typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;
typedef vector<double> VD;
typedef vector<VD> VVD;

template<typename T> void chmin(T &a, T b) { if (a > b) a = b; }
template<typename T> void chmax(T &a, T b) { if (a < b) a = b; }

int in() { int x; scanf("%d", &x); return x; }
ll lin() { ll x; scanf("%lld", &x); return x; }

const int N = 100010;
const ll INF = 1e18;
ll x[N], y[N];
char d[N];
ll xrmi = INF, xlmi = INF, xudmi = INF;
ll xrma = -INF, xlma = -INF, xudma = -INF;
ll yumi = INF, ydmi = INF, ylrmi = INF;
ll yuma = -INF, ydma = -INF, ylrma = -INF;

double f(double t){
    double xmi = fmin(fmin(xrmi + t, xlmi - t), xudmi);
    double xma = fmax(fmax(xrma + t, xlma - t), xudma);
    double ymi = fmin(fmin(yumi + t, ydmi - t), ylrmi);
    double yma = fmax(fmax(yuma + t, ydma - t), ylrma);
    return (xma - xmi) * (yma - ymi);
}

double calc(double le, double ri){
    double ret = fmin(f(le), f(ri));
    REP(_,100){
        double t1 = (2 * le + ri) / 3;
        double t2 = (le + 2 * ri) / 3;
        double f1 = f(t1), f2 = f(t2);
        if (f1 <= f2) ri = t2;
        else le = t1;
    }
    ret = fmin(ret, f(le));
    return ret;
}

int main() {
    int n;
    cin >> n;
    REP(i,n){
        cin >> x[i] >> y[i] >> d[i];
    }

    REP(i,n){
        if (d[i] == 'R'){
            chmin(xrmi, x[i]);
            chmax(xrma, x[i]);
        }else if (d[i] == 'L'){
            chmin(xlmi, x[i]);
            chmax(xlma, x[i]);
        }else{
            chmin(xudmi, x[i]);
            chmax(xudma, x[i]);
        }
        if (d[i] == 'U'){
            chmin(yumi, y[i]);
            chmax(yuma, y[i]);
        }else if (d[i] == 'D'){
            chmin(ydmi, y[i]);
            chmax(ydma, y[i]);
        }else{
            chmin(ylrmi, y[i]);
            chmax(ylrma, y[i]);
        }
    }

    VD ts({0, 1.5e9});
    if (xrmi != INF && xlmi != INF && xlmi > xrmi) ts.push_back(0.5 * (xlmi - xrmi));
    if (xrmi != INF && xudmi != INF && xudmi > xrmi) ts.push_back(xudmi - xrmi);
    if (xlmi != INF && xudmi != INF && xlmi > xudmi) ts.push_back(xlmi - xudmi);
    if (xlma != -INF && xrma != -INF && xrma < xlma) ts.push_back(0.5 * (xlma - xrma));
    if (xlma != -INF && xudma != -INF && xudma < xlma) ts.push_back(xlma - xudma);
    if (xrma != -INF && xudma != -INF && xudma < xrma) ts.push_back(xrma - xudma);

    if (yumi != INF && ydmi != INF && ydmi > yumi) ts.push_back(0.5 * (ydmi - yumi));
    if (yumi != INF && ylrmi != INF && ylrmi > yumi) ts.push_back(ylrmi - yumi);
    if (ydmi != INF && ylrmi != INF && ydmi > ylrmi) ts.push_back(ydmi - ylrmi);
    if (ydma != -INF && yuma != -INF && yuma < ydma) ts.push_back(0.5 * (ydma - yuma));
    if (ydma != -INF && ylrma != -INF && ylrma < ydma) ts.push_back(ydma - ylrma);
    if (yuma != -INF && ylrma != -INF && ylrma < yuma) ts.push_back(yuma - ylrma);

    sort(ALL(ts));
    double ans = INF;

    REP(i,ts.size()){
        chmin(ans, calc(ts[i], ts[i + 1]));
    }
    printf("%.15f\n", ans);

    return 0;
}


Measured memory_bytes: 1920