#include <bits/stdc++.h>

#define fi first
#define se second
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define INF  (1<<30)
#define INFL (1LL<<60)
#define MOD 1000000007
#define EPS ((ld)(1e-9))

#define sz(x) ((int)(x).size())
#define setz(x) memset(x, 0, sizeof(x))
#define all(x) (x).begin(), (x).end()
#define rep(i, x)  for (int i = 0, _##i = (x); i < _##i; i++)
#define repp(i, s, e) for (int i = (s), _##i = (e); i < _##i; i++)
#define repr(i, s, e) for (int i = (s)-1, _##i = (e); i >= _##i; i--)
#define repi(i, x) for (auto &i : (x))


using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ld, ld> pdd;
typedef pair<ll, ll> pll;

template<typename T, typename V>
ostream &operator<<(ostream &os, const pair<T, V> pai) { 
    return os << '(' << pai.first << ' ' << pai.second << ')';
}

template<typename T>
ostream &operator<<(ostream &os, const vector<T> v) {
    cout << '[';
    rep(i, sz(v)) cout << v[i] << ",";
    cout << "]";
    return os;
}

template<typename T>
ostream &operator<<(ostream &os, const set<T> v) {
    cout << "{";
    for (auto p : v) cout << p << ",";
    cout << "}";
    return os;
}

template<typename T, typename V>
ostream &operator<<(ostream &os, const map<T, V> v) {
    cout << "{";
    for (auto p : v) cout << p << ",";
    cout << "}";
    return os;
}

#ifndef __SOULTCH
#define debug(...) 0
#define endl '\n'
#else
#define debug(...) cout << " [-] ", _dbg(#__VA_ARGS__, __VA_ARGS__)
template<class TH> void _dbg(const char *sdbg, TH h){ cout << sdbg << '=' << h << endl; }
template<class TH, class... TA> void _dbg(const char *sdbg, TH h, TA... a) {
    while(*sdbg != ',') cout << *sdbg++;
    cout << '=' << (h) << ','; 
    _dbg(sdbg+1, a...);
}
#endif

template<typename T> void get_max(T &a, T b) {a = max(a, b);}
template<typename T> void get_min(T &a, T b) {a = min(a, b);}

int N, M;
int X[100000], Y[100000], dX[100000], dY[100000];
vector<ld> cand;
void calc() {
    vector<int> p, m, n;
    rep(i, N) {
        if (dX[i] > 0) p.pb(X[i]);
        else if (dX[i] < 0) m.pb(X[i]);
        else n.pb(X[i]);
    }
    
    sort(all(p));
    sort(all(m));
    sort(all(n));

    if (sz(p) > 0 and sz(n) > 0) cand.pb(n[0]-p[0]);
    if (sz(p) > 0 and sz(m) > 0) cand.pb((m[0]-p[0])*(ld)0.5);
    if (sz(n) > 0 and sz(m) > 0) cand.pb(m[0]-n[0]);
}

ld calc_rect(ld t) {
    t = abs(t);
    ld x1 = INFL, x2 = -INFL, y1 = INFL, y2 = -INFL;
    rep(i, N) {
        get_min(x1, X[i]+t*dX[i]);
        get_max(x2, X[i]+t*dX[i]);
        get_min(y1, Y[i]+t*dY[i]);
        get_max(y2, Y[i]+t*dY[i]);
    }
    return (x2-x1)*(y2-y1);
}

void reverse1() {
    rep(i, N) dX[i] *= -1, X[i] *= -1;
}

void reverse2() {
    rep(i, N) swap(X[i], Y[i]), swap(dX[i], dY[i]);
}

int main(void) {
    iostream::sync_with_stdio(false);
    cin.tie(nullptr), cout.tie(nullptr);

    cin >> N;
    rep(i, N) {
        int a, b; char s[2]; cin >> a >> b >> s;
        X[i] = a, Y[i] = b;
        switch(s[0]) {
            case 'L': dX[i] = -1; break;
            case 'R': dX[i] = 1; break;
            case 'D': dY[i] = -1; break;
            case 'U': dY[i] = 1; break;
        }
    }
    calc();
    reverse1();
    calc();
    reverse2();
    calc();
    reverse1();
    calc(); 
    ld r = calc_rect(0);
    repi(i, cand) get_min(r, calc_rect(i));
    cout << fixed << setprecision(15) << r << endl;
}


Measured memory_bytes: 2616