#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < ll(n); i++)

const ll INF = 1LL << 60;
int n;
double x[100100], y[100100];
char d[100100];
vector<double> alt;

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

    alt.push_back(0);

    // Left
    {
        double mi1 = INF;  // L
        double mi2 = INF;  // R
        double mi3 = INF;  // UD
        rep(i, n) {
            if (d[i] == 'L')
                mi1 = min(mi1, x[i]);
            else if (d[i] == 'R')
                mi2 = min(mi2, x[i]);
            else
                mi3 = min(mi3, x[i]);
        }
        if (mi1 < INF && mi2 < INF) alt.push_back(abs(mi1 - mi2) / 2);
        if (mi1 < INF && mi3 < INF) alt.push_back(abs(mi1 - mi3));
        if (mi2 < INF && mi3 < INF) alt.push_back(abs(mi2 - mi3));
    }

    // Right
    {
        double ma1 = -INF;  // L
        double ma2 = -INF;  // R
        double ma3 = -INF;  // UD
        rep(i, n) {
            if (d[i] == 'L')
                ma1 = max(ma1, x[i]);
            else if (d[i] == 'R')
                ma2 = max(ma2, x[i]);
            else
                ma3 = max(ma3, x[i]);
        }
        if (ma1 > -INF && ma2 > -INF) alt.push_back(abs(ma1 - ma2) / 2);
        if (ma1 > -INF && ma3 > -INF) alt.push_back(abs(ma1 - ma3));
        if (ma2 > -INF && ma3 > -INF) alt.push_back(abs(ma2 - ma3));
    }

    // Down
    {
        double mi1 = INF;  // D
        double mi2 = INF;  // U
        double mi3 = INF;  //
        rep(i, n) {
            if (d[i] == 'D')
                mi1 = min(mi1, y[i]);
            else if (d[i] == 'U')
                mi2 = min(mi2, y[i]);
            else
                mi3 = min(mi3, y[i]);
        }
        if (mi1 < INF && mi2 < INF) alt.push_back(abs(mi1 - mi2) / 2);
        if (mi1 < INF && mi3 < INF) alt.push_back(abs(mi1 - mi3));
        if (mi2 < INF && mi3 < INF) alt.push_back(abs(mi2 - mi3));
    }

    // Up
    {
        double ma1 = -INF;  // U
        double ma2 = -INF;  // D
        double ma3 = -INF;  //
        rep(i, n) {
            if (d[i] == 'D')
                ma1 = max(ma1, y[i]);
            else if (d[i] == 'U')
                ma2 = max(ma2, y[i]);
            else
                ma3 = max(ma3, y[i]);
        }
        if (ma1 > -INF && ma2 > -INF) alt.push_back(abs(ma1 - ma2) / 2);
        if (ma1 > -INF && ma3 > -INF) alt.push_back(abs(ma1 - ma3));
        if (ma2 > -INF && ma3 > -INF) alt.push_back(abs(ma2 - ma3));
    }

    sort(alt.begin(), alt.end());
    alt.erase(unique(alt.begin(), alt.end()), alt.end());
    double ans = INF;
    rep(i, alt.size()) {
        double t = alt[i];
        double xmi = INF, xma = -INF, ymi = INF, yma = -INF;
        rep(i, n) {
            double cx, cy;
            if (d[i] == 'L')
                cx = x[i] - t, cy = y[i];
            else if (d[i] == 'R')
                cx = x[i] + t, cy = y[i];
            else if (d[i] == 'U')
                cx = x[i], cy = y[i] + t;
            else
                cx = x[i], cy = y[i] - t;
            xmi = min(xmi, cx);
            xma = max(xma, cx);
            ymi = min(ymi, cy);
            yma = max(yma, cy);
        }
        ans = min(ans, (xma - xmi) * (yma - ymi));
    }
    printf("%.9f\n", ans);
}

Measured memory_bytes: 5400