#include "bits/stdc++.h"
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=int(a),i##_len=(b);i<i##_len;++i)
#define MSVC_UNKO(x) x
#define rep(...) MSVC_UNKO(_overload3(__VA_ARGS__,repi,_rep,_rep)(__VA_ARGS__))
#define all(c) c.begin(),c.end()
#define write(x) cout<<(x)<<'\n'
using namespace std; typedef long long ll; template<class T>using vv = vector<vector<T>>;
template<class T>auto vvec(int n, int m, T v) { return vv<T>(n, vector<T>(m, v)); }
template<class T, class U>bool chmax(T& a, U&& b) { return a < b ? a = b, 1 : 0; }
template<class T, class U>bool chmin(T& a, U&& b) { return b < a ? a = b, 1 : 0; }
constexpr int INF = 1 << 29, MOD = int(1e9) + 7; constexpr ll LINF = 1LL << 60;
struct aaa { aaa() { cin.tie(0); ios::sync_with_stdio(0); cout << fixed << setprecision(10); }; }aaaa;

int N;
vector<double> X, Y;
vector<char> D;
vector<int> dcnt(4, 0);

double sxmin = 1e12, sxmax = -1e12;
double symin = 1e12, symax = -1e12;
double rxmin = 1e12, rxmax = -1e12;
double lxmin = 1e12, lxmax = -1e12;
double uymin = 1e12, uymax = -1e12;
double dymin = 1e12, dymax = -1e12;

double calcArea(double t) {
    double xmin = min({
        rxmin + t, lxmin - t, sxmin
        });
    double xmax = max({
        rxmax + t, lxmax - t, sxmax
        });
    double ymin = min({
        uymin + t, dymin - t, symin
        });
    double ymax = max({
        uymax + t, dymax - t, symax
        });
    return (xmax - xmin) * (ymax - ymin);
}

int main() {
    cin >> N;
    X.resize(N);
    Y.resize(N);
    D.resize(N);
    rep(i, N) {
        int x, y;
        char d;
        cin >> x >> y >> d;
        X[i] = x;
        Y[i] = y;
        D[i] = d;
    }

    rep(i, N) {
        if (D[i] == 'R') {
            rxmin = min(rxmin, X[i]);
            rxmax = max(rxmax, X[i]);
            symin = min(symin, Y[i]);
            symax = max(symax, Y[i]);
            dcnt[0]++;
        }
        else if (D[i] == 'L') {
            lxmin = min(lxmin, X[i]);
            lxmax = max(lxmax, X[i]);
            symin = min(symin, Y[i]);
            symax = max(symax, Y[i]);
            dcnt[2]++;
        }
        else if (D[i] == 'U') {
            uymin = min(uymin, Y[i]);
            uymax = max(uymax, Y[i]);
            sxmin = min(sxmin, X[i]);
            sxmax = max(sxmax, X[i]);
            dcnt[1]++;
        }
        else {
            dymin = min(dymin, Y[i]);
            dymax = max(dymax, Y[i]);
            sxmin = min(sxmin, X[i]);
            sxmax = max(sxmax, X[i]);
            dcnt[3]++;
        }
    }

    vector<double> t_event;
    t_event.push_back(0);
    if (dcnt[0] && (dcnt[1] || dcnt[3])) {
        t_event.push_back(sxmin - rxmin);
        t_event.push_back(sxmax - rxmin);
        t_event.push_back(sxmin - rxmax);
        t_event.push_back(sxmax - rxmax);
    }
    if (dcnt[2] && (dcnt[1] || dcnt[3])) {
        t_event.push_back(lxmin - sxmin);
        t_event.push_back(lxmax - sxmin);
        t_event.push_back(lxmin - sxmax);
        t_event.push_back(lxmax - sxmax);
    }
    if (dcnt[1] && (dcnt[0] || dcnt[2])) {
        t_event.push_back(symin - uymin);
        t_event.push_back(symax - uymin);
        t_event.push_back(symin - uymax);
        t_event.push_back(symax - uymax);
    }
    if (dcnt[3] && (dcnt[0] || dcnt[2])) {
        t_event.push_back(dymin - symin);
        t_event.push_back(dymax - symin);
        t_event.push_back(dymin - symax);
        t_event.push_back(dymax - symax);
    }
    if (dcnt[0] && dcnt[2]) {
        t_event.push_back((lxmin - rxmin) / 2.0);
        t_event.push_back((lxmax - rxmin) / 2.0);
        t_event.push_back((lxmin - rxmax) / 2.0);
        t_event.push_back((lxmax - rxmax) / 2.0);
    }
    if (dcnt[1] && dcnt[3]) {
        t_event.push_back((dymin - uymin) / 2.0);
        t_event.push_back((dymax - uymin) / 2.0);
        t_event.push_back((dymin - uymax) / 2.0);
        t_event.push_back((dymax - uymax) / 2.0);
    }

    double ans = 1e18;
    for (double t : t_event) {
        if (t < 0) continue;
        ans = min(ans, calcArea(t));
    }

    write(ans);
}

Measured memory_bytes: 1920