#include <bits/stdc++.h>
#define FOR(i, a, n) for(ll i = (ll)a; i < (ll)n; i++)
#define FORR(i, n) for(ll i = (ll)n - 1LL; i >= 0LL; i--)
#define rep(i, n) FOR(i, 0, n)
#define ALL(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
template <typename T> using V = vector<T>;

constexpr int Mod = 998244353;
constexpr int mod = 1e9 + 7;
constexpr ll inf = 1LL << 60;

template <typename T> constexpr bool chmax(T &a, const T &b) {
    if(a >= b) return false;
    a = b;
    return true;
}
template <typename T> constexpr bool chmin(T &a, const T &b) {
    if(a <= b) return false;
    a = b;
    return true;
}

/*-------------------------------------------*/

int n;
V<double> x, y;
V<char> d;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(0);

    cin >> n;
    x.resize(n);
    y.resize(n);
    d.resize(n);
    rep(i, n) cin >> x[i] >> y[i] >> d[i];
    V<double> t;
    t.push_back(0);

    {
        double mn1 = inf;
        double mn2 = inf;
        double mn3 = inf;
        rep(i, n) {
            if(d[i] == 'L')
                chmin(mn1, x[i]);
            else if(d[i] == 'R')
                chmin(mn2, x[i]);
            else
                chmin(mn3, x[i]);
        }
        if(mn1 < inf && mn2 < inf) t.push_back(abs(mn1 - mn2) / 2);
        if(mn1 < inf && mn3 < inf) t.push_back(abs(mn1 - mn3));
        if(mn2 < inf && mn3 < inf) t.push_back(abs(mn2 - mn3));
    }
    {
        double mx1 = -inf;
        double mx2 = -inf;
        double mx3 = -inf;
        rep(i, n) {
            if(d[i] == 'L')
                chmax(mx1, x[i]);
            else if(d[i] == 'R')
                chmax(mx2, x[i]);
            else
                chmax(mx3, x[i]);
        }
        if(mx1 > -inf && mx2 > -inf) t.push_back(abs(mx1 - mx2) / 2);
        if(mx1 > -inf && mx3 > -inf) t.push_back(abs(mx1 - mx3));
        if(mx2 > -inf && mx3 > -inf) t.push_back(abs(mx2 - mx3));
    }
    {
        double mn1 = inf;
        double mn2 = inf;
        double mn3 = inf;
        rep(i, n) {
            if(d[i] == 'D')
                chmin(mn1, y[i]);
            else if(d[i] == 'U')
                chmin(mn2, y[i]);
            else
                chmin(mn3, y[i]);
        }
        if(mn1 < inf && mn2 < inf) t.push_back(abs(mn1 - mn2) / 2);
        if(mn1 < inf && mn3 < inf) t.push_back(abs(mn1 - mn3));
        if(mn2 < inf && mn3 < inf) t.push_back(abs(mn2 - mn3));
    }
    {
        double mx1 = -inf;
        double mx2 = -inf;
        double mx3 = -inf;
        rep(i, n) {
            if(d[i] == 'D')
                chmax(mx1, y[i]);
            else if(d[i] == 'U')
                chmax(mx2, y[i]);
            else
                chmax(mx3, y[i]);
        }
        if(mx1 > -inf && mx2 > -inf) t.push_back(abs(mx1 - mx2) / 2);
        if(mx1 > -inf && mx3 > -inf) t.push_back(abs(mx1 - mx3));
        if(mx2 > -inf && mx3 > -inf) t.push_back(abs(mx2 - mx3));
    }
    double res = inf;
    for(double T : t) {
        double xmn = inf, xmx = -inf, ymn = inf, ymx = -inf;
        rep(i, n) {
            double xx = x[i], yy = y[i];
            if(d[i] == 'L') xx -= T;
            if(d[i] == 'R') xx += T;
            if(d[i] == 'D') yy -= T;
            if(d[i] == 'U') yy += T;
            chmin(xmn, xx);
            chmax(xmx, xx);
            chmin(ymn, yy);
            chmax(ymx, yy);
        }
        chmin(res, (xmx - xmn) * (ymx - ymn));
    }
    cout << fixed << setprecision(10) << res << endl;

    return 0;
}

Measured memory_bytes: 1920