#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
template<class T>
inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}

template<class T>
inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}

#define EPS (1e-7)
#define INF (1e18)
#define PI (acos(-1))
//const ll mod = 1000000007;
ll N;
long double x[105000], y[100500];
vector<long double> X, Y;
vector<char> D;
char d[100500];
long double ans = 1e18;
map<char, long double> Xminimum, Xmaximum, Yminimum, Ymaximum;

long double g(long double time) {
    long double xmax = -1e12;
    long double xmin = 1e12;
    long double ymax = -1e12;
    long double ymin = 1e12;
    for(int i = 0; i < X.size(); i++) {
        long double xnow = X[i];
        long double ynow = Y[i];
        if(D[i] == 'D') ynow -= time;
        if(D[i] == 'U') ynow += time;
        if(D[i] == 'R') xnow += time;
        if(D[i] == 'L') xnow -= time;
        chmax(xmax, xnow);
        chmax(ymax, ynow);
        chmin(xmin, xnow);
        chmin(ymin, ynow);
    }
    return (xmax - xmin) * (ymax - ymin);
}

void f(long double start, long double end) {
    for(int i = 1; i <= 100; i++) {
        //cerr << start << " " << end << endl;
        long double d1 = (start * 2 + end) / 3.0;
        long double d2 = (start + 2 * end) / 3.0;
        if(g(d1) > g(d2)) start = d1;
        else end = d2;
    }
    chmin(ans, g(start));
}

string DURL = "DURL";

vector<long double> v;
int main() {
    cout.precision(10);
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> N;
    v.push_back(0);
    v.push_back(1e9);
    for(int i = 0; i < DURL.size(); i++) {
        Xmaximum[DURL[i]] = -INF;
        Ymaximum[DURL[i]] = -INF;
        Xminimum[DURL[i]] = INF;
        Yminimum[DURL[i]] = INF;
    }
    for(int i = 1; i <= N; i++) {
        cin >> x[i] >> y[i] >> d[i];
        chmax(Xmaximum[d[i]], x[i]);
        chmin(Xminimum[d[i]], x[i]);
        chmax(Ymaximum[d[i]], y[i]);
        chmin(Yminimum[d[i]], y[i]);
    }
    for(int i = 0; i < DURL.size(); i++) {
        char moji = DURL[i];
        if(abs(Xmaximum[moji] + INF) < EPS) continue;
        X.push_back(Xmaximum[moji]);
        X.push_back(Xminimum[moji]);
        Y.push_back(Ymaximum[moji]);
        Y.push_back(Yminimum[moji]);
        D.push_back(moji);
        D.push_back(moji);
    }
    for(int i = 0; i < X.size(); i++) {
        //cerr << X[i] << " " << Y[i] << " " << D[i] << endl;
    }
    //f(0, 1e9);
    long double maxi = -1e9;
    long double mini = -1e9;
    long double cons = -1e9;
    for(int i = 1; i <= N; i++) {
        if(d[i] == 'U') chmax(mini, y[i]);
        else if(d[i] == 'D') chmax(maxi, y[i]);
        else chmax(cons, y[i]);
        if(mini < cons) v.push_back((cons - mini));
        if(mini < maxi) v.push_back((maxi - mini) / 2);
        if(maxi > cons) v.push_back(maxi - cons);
    }
    maxi = -1e9;
    mini = -1e9;
    cons = -1e9;
    for(int i = 1; i <= N; i++) {
        if(d[i] == 'R') chmax(mini, x[i]);
        else if(d[i] == 'L') chmax(maxi, x[i]);
        else chmax(cons, x[i]);
        if(mini < cons) v.push_back((cons - mini));
        if(mini < maxi) v.push_back((maxi - mini) / 2);
        if(maxi > cons) v.push_back(maxi - cons);
    }
    maxi = 1e9;
    mini = 1e9;
    cons = 1e9;
    for(int i = 1; i <= N; i++) {
        if(d[i] == 'D') chmin(mini, y[i]);
        else if(d[i] == 'U') chmin(maxi, y[i]);
        else chmin(cons, y[i]);
        if(mini > cons) v.push_back((mini - cons));
        if(mini > maxi) v.push_back((mini - maxi) / 2);
        if(maxi < cons) v.push_back(cons - maxi);
    }
    maxi = 1e9;
    mini = 1e9;
    cons = 1e9;
    for(int i = 1; i <= N; i++) {
        if(d[i] == 'L') chmin(mini, x[i]);
        else if(d[i] == 'R') chmin(maxi, x[i]);
        else chmin(cons, x[i]);
        if(mini > cons) v.push_back((mini - cons));
        if(mini > maxi) v.push_back((mini - maxi) / 2);
        if(maxi < cons) v.push_back(cons - maxi);
    }
    sort(v.begin(), v.end());
    v.erase(unique(v.begin(), v.end()), v.end());
    for(int i = 1; i < v.size(); i++) f(v[i-1], v[i]);
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 20968