#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())
#define show(x) {for(auto i: x){cout << i << " ";} cout << endl;}
using namespace std;
using ll = long long;
using P = pair<int, int>;

const int INF = 1e9;
double xleft = INF, xright = -INF, up = -INF, down = INF;
double rightVecMax = -INF, rightVecMin = INF;
double leftVecMax = -INF, leftVecMin = INF;
double upVecMax = -INF, upVecMin = INF;
double downVecMax = -INF, downVecMin = INF;

double calLeft(double time) {
    double res = min(xleft, rightVecMin + time);
    res = min(res, leftVecMin - time);
    return res;
}
double calRight(double time) {
    double res = max(xright, leftVecMax - time);
    res = max(res, rightVecMax + time);
    return res;
}
double calUp(double time) {
    double res = max(up, upVecMax + time);
    res = max(res, downVecMax - time);
    return res;
}
double calDown(double time) {
    double res = min(down, upVecMin + time);
    res = min(res, downVecMin - time);
    return res;
}

double cal(double time) {
    double res = (calRight(time) - calLeft(time)) * (calUp(time) - calDown(time));
    return res;
}

int main() {
    // 結果を決め打ち（二分探索）、dp?、
    // xとy共に、減少、不変、増加を辿る、相加相乗平均によりグラフが重なったところ、
    // 交差する点がなければ4つの点の中で最小値
    // 上下左右を関数化する
    int N;
    cin >> N;
    vector<double> X(N);
    vector<double> Y(N);
    rep(i, N) {
        double x, y;
        char d;
        cin >> x >> y >> d;
        X.push_back(x);
        Y.push_back(y);
        if (d == 'R') {
            up = max(up, y);
            down = min(down, y);
            rightVecMax = max(rightVecMax, x);
            rightVecMin = min(rightVecMin, x);
        }
        if (d == 'L') {
            up = max(up, y);
            down = min(down, y);
            leftVecMax = max(leftVecMax, x);
            leftVecMin = min(leftVecMin, x);
        }
        if (d == 'U') {
            xright = max(xright, x);
            xleft = min(xleft, x);
            upVecMax = max(upVecMax, y);
            upVecMin = min(upVecMin, y);
        }
        if (d == 'D') {
            xright = max(xright, x);
            xleft = min(xleft, x);
            downVecMax = max(downVecMax, y);
            downVecMin = min(downVecMin, y);
        }
    }
    double ans = cal(0);
    double l = 0, r = INF; // 時間の山登り法
    rep(i, 200) {
        double l2 = (l * 2 + r) / 3;
        double r2 = (l + r * 2) / 3;
        if (cal(l2) < cal(r2)) r = r2;
        else l = l2;
    }
    ans = min(ans, min(cal(l), cal(r)));
    // candをいくつかに絞り込む
    vector<double> cand;
    cand.push_back(0);
    if (rightVecMin < xleft) {
        cand.push_back(xleft - rightVecMin);
        cand.push_back(xright - rightVecMin);
    }
    if (rightVecMax < xright) {
        cand.push_back(xright - rightVecMax);
    }
    if (leftVecMax > xright) {
        cand.push_back(leftVecMax - xright);
        cand.push_back(leftVecMax - xleft);
    }
    if (leftVecMin > xleft) {
        cand.push_back(leftVecMin - xleft);
    }
    if (upVecMin < down) {
        cand.push_back(down - upVecMin);
        cand.push_back(up - upVecMin);
    }
    if (upVecMax < up) {
        cand.push_back(up - upVecMax);
    }
    if (downVecMax > up) {
        cand.push_back(downVecMax - up);
        cand.push_back(downVecMax - down);
    }
    if (downVecMin > down) {
        cand.push_back(downVecMin - down);
    }
    cand.push_back(INF);
    sort(cand.begin(), cand.end());
    for (int i = 0; i < sz(cand) - 1; i++) {
        if (cand[i] < 0 || cand[i+1] < 0) continue;
        l = cand[i];
        r = (cand[i] + cand[i+1]) / 2;
        ans = min(ans, min(cal(l), cal(r)));
        rep(i, 200) {
            double l2 = (l * 2 + r) / 3;
            double r2 = (l + r * 2) / 3;
            if (cal(l2) < cal(r2)) r = r2;
            else l = l2;
        }
        ans = min(ans, min(cal(l), cal(r)));
        l = (cand[i] + cand[i+1]) / 2;
        r = cand[i+1];
        ans = min(ans, min(cal(l), cal(r)));
        rep(i, 200) {
            double l2 = (l * 2 + r) / 3;
            double r2 = (l + r * 2) / 3;
            if (cal(l2) < cal(r2)) r = r2;
            else l = l2;
        }
        ans = min(ans, min(cal(l), cal(r)));    
    }
    printf("%.12f\n", ans);
    return 0;
    // ll, 0, -, 1i, for s&g, debug
}



Measured memory_bytes: 6324