#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> ii;
typedef tuple<ll, ll, ll> iii;
typedef vector<ll> vi;
typedef vector<ii> vii;
typedef vector<iii> viii;
typedef vector<vi> vvi;
typedef vector<vii> vvii;
#define REP(i,n) for (ll i = 0; i < n; ++i)
#define REPR(i,n) for (ll i = n-1; i >= 0; --i)
#define FOR(i,m,n) for (ll i = m; i < n; ++i)
#define FORR(i,m,n) for (ll i = n-1; i >= m; --i)
#define FORE(x,xs) for (const auto& x : xs)
#define PB push_back
#define MP make_pair
#define MT make_tuple
#define ALL(v) v.begin(), v.end()

#define RIGHT 0
#define LEFT 1
#define UP 2
#define DOWN 3

const ll MAX_RANGE = 2e9;

int N;
ll lmn, rmx, tmn, bmx;
ll direction[4][2];

ll calc(ll mn, ll mx, int i1, int i2, ll t) {
    ll r = mx, l = mn;
    if (direction[i1][1] != MAX_RANGE) {
        r = max(r, direction[i1][1]-t);
        l = min(l, direction[i1][0]-t);
    }
    if (direction[i2][1] != MAX_RANGE) {
        r = max(r, direction[i2][1]+t);
        l = min(l, direction[i2][0]+t);
    }
    if (r > MAX_RANGE || l < -MAX_RANGE) return -1;
    return r-l;
}

ll calcArea(ll t) {
    ll w = calc(lmn, rmx, LEFT, RIGHT, t);
    ll h = calc(tmn, bmx, DOWN, UP, t);
    if (w < 0 || h < 0) return MAX_RANGE*MAX_RANGE;
    return w*h;
}

void candidates(ll mn, ll mx, int i1, int i2, vi& cand) {
    ll lo = -1, hi = MAX_RANGE;
    while (hi - lo > 2) {
        ll m1 = (hi+2*lo)/3;
        ll m2 = (2*hi+lo)/3;
        if (calc(mn, mx, i1, i2, m1) > calc(mn, mx, i1, i2, m2)) lo = m1;
        else hi = m2;
    }
    ll minValue = calc(mn, mx, i1, i2, lo+1);
    ll minTime = lo+1;

    // 傾き -1 -> 0
    lo = -1, hi = minTime;
    while (hi - lo > 1) {
        ll mid = (hi+lo)/2;
        if (calc(mn, mx, i1, i2, mid) == minValue) hi = mid;
        else lo = mid;
    }
    cand.PB(hi);

    // 傾き -2 -> -1
    hi = lo, lo = -1;
    while (hi - lo > 1) {
        ll mid = (hi+lo)/2;
        if (abs(calc(mn, mx, i1, i2, mid) - calc(mn, mx, i1, i2, mid+1)) == 1) hi = mid;
        else lo = mid;
    }
    cand.PB(hi);

    // 傾き 0 -> 1
    lo = minTime, hi = MAX_RANGE;
    while (hi - lo > 1) {
        ll mid = (hi+lo)/2;
        if (calc(mn, mx, i1, i2, mid) == minValue) lo = mid;
        else hi = mid;
    }
    cand.PB(lo);

    // 傾き 1 -> 2
    lo = hi, hi = MAX_RANGE;
    while (hi - lo > 1) {
        ll mid = (hi+lo)/2;
        if (abs(calc(mn, mx, i1, i2, mid-1) - calc(mn, mx, i1, i2, mid)) == 1) lo = mid;
        else hi = mid;
    }
    cand.PB(lo);
}

ld solve() {
    ll ans = MAX_RANGE*MAX_RANGE;
    vi cands(1);
    candidates(lmn, rmx, LEFT, RIGHT, cands);
    candidates(tmn, bmx, DOWN, UP, cands);
    FORE (ca, cands) FOR (c, ca-1, ca+2) if (c >= 0) {
        ans = min(ans, calcArea(c));
    }
    return ans/4.0l;
}

int main() {
    cin >> N;
    lmn = tmn = MAX_RANGE;
    rmx = bmx = -MAX_RANGE;
    REP (i, 4) {
        direction[i][0] = MAX_RANGE;
        direction[i][1] = -MAX_RANGE;
    }
    REP (i, N) {
        ll x, y; char d;
        cin >> x >> y >> d;
        x *= 2;
        y *= 2;
        if (d == 'R') {
            tmn = min(tmn, y);
            bmx = max(bmx, y);
            direction[RIGHT][0] = min(direction[RIGHT][0], x);
            direction[RIGHT][1] = max(direction[RIGHT][1], x);
        } else if (d == 'L') {
            tmn = min(tmn, y);
            bmx = max(bmx, y);
            direction[LEFT][0] = min(direction[LEFT][0], x);
            direction[LEFT][1] = max(direction[LEFT][1], x);
        } else if (d == 'U') {
            lmn = min(lmn, x);
            rmx = max(rmx, x);
            direction[UP][0] = min(direction[UP][0], y);
            direction[UP][1] = max(direction[UP][1], y);
        } else if (d == 'D') {
            lmn = min(lmn, x);
            rmx = max(rmx, x);
            direction[DOWN][0] = min(direction[DOWN][0], y);
            direction[DOWN][1] = max(direction[DOWN][1], y);
        }
    }
    cout << fixed << setprecision(12) << solve() << endl;
}

Measured memory_bytes: 256