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

// Define
using ll = long long;
using ull = unsigned long long;
using ld = long double;
const ll dx[4] = {1, 0, -1, 0};
const ll dy[4] = {0, 1, 0, -1};
const ll MOD = 1e9 + 7;
const ll mod = 998244353;
const ll inf = 1 << 30;
const ll LINF = LONG_MAX;
const ll INF = 1LL << 60;
const ull MAX = ULONG_MAX;
#define mp make_pair
#define pb push_back
#define elif else if
#define endl '\n'
#define space ' '
#define def inline auto
#define func inline constexpr ll
#define run(a) __attribute__((constructor)) def _##a()
#define all(v) begin(v), end(v)
#define rall(v) rbegin(v), rend(v)
#define input(a) scanf("%lld", &(a))
#define print(a) printf("%lld\n", (a))
#define fi first
#define se second
#define ok(a, b) (0 <= (a) && (a) < (b))
template <class T> using vvector = vector<vector<T>>;
template <class T> using pvector = vector<pair<T, T>>;
template <class T>
using rpriority_queue = priority_queue<T, vector<T>, greater<T>>;

template <class T> bool chmax(T &a, const T &b) {
    if (a < b) {
        a = b;
        return 1;
    }
    return 0;
}
template <class T> bool chmin(T &a, const T &b) {
    if (a > b) {
        a = b;
        return 1;
    }
    return 0;
}

// Debug
#define debug(...)                                                             \
    {                                                                          \
        cerr << __LINE__ << ": " << #__VA_ARGS__ << " = ";                     \
        for (auto &&X : {__VA_ARGS__}) cerr << "[" << X << "] ";               \
        cerr << endl;                                                          \
    }

#define dump(a, h, w)                                                          \
    {                                                                          \
        cerr << __LINE__ << ": " << #a << " = [" << endl;                      \
        rep(__i, h) {                                                          \
            rep(__j, w) { cerr << a[__i][__j] << space; }                      \
            cerr << endl;                                                      \
        }                                                                      \
        cerr << "]" << endl;                                                   \
    }

#define vdump(a, n)                                                            \
    {                                                                          \
        cerr << __LINE__ << ": " << #a << " = [";                              \
        rep(__i, n) if (__i) cerr << space << a[__i];                          \
        else cerr << a[__i];                                                   \
        cerr << "]" << endl;                                                   \
    }

// Loop
#define inc(i, a, n) for (ll i = (a), _##i = (n); i <= _##i; ++i)
#define dec(i, a, n) for (ll i = (a), _##i = (n); i >= _##i; --i)
#define rep(i, n) for (ll i = 0, _##i = (n); i < _##i; ++i)
#define each(i, a) for (auto &&i : a)
#define loop() for (;;)

// Stream
#define fout(n) cout << fixed << setprecision(n)
#define fasten cin.tie(0), ios::sync_with_stdio(0)
run(0) { fasten, fout(10); }

// Speed
#pragma GCC optimize("O3")
#pragma GCC target("avx")

// Math
func gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
func lcm(ll a, ll b) { return a * b / gcd(a, b); }
func sign(ll a) { return a ? abs(a) / a : 0; }

inline constexpr ll modulo(const ll n, const ll m = MOD) {
    if (n < 0) {
        return n % m + m;
    } else if (n >= m) {
        return n % m;
    } else {
        return n;
    }
}

inline constexpr ll chmod(ll &n, const ll m = MOD) { return n = modulo(n, m); }

inline constexpr ll mpow(ll a, ll n, const ll m = MOD) {
    ll r = 1;
    while (n) {
        if (n & 1) r *= a;
        chmod(r, m);
        a *= a;
        chmod(a, m);
        n >>= 1;
    }
    return r;
}

struct Factor {
    inline vector<ll> factors(ll N) {
        vector<ll> A;
        ll i = 2;
        while (i * i <= N) {
            if (N % i == 0) {
                A.push_back(i);
                N /= i;
            } else {
                i++;
            }
        }
        if (N != 1) A.push_back(N);
        sort(all(A));
        return A;
    }
    inline vector<ll> divisor(ll N) {
        vector<ll> A = factors(N), B;
        ll a = A.size();
        rep(i, 1 << a) {
            ll d = 1;
            rep(j, a) if (i & (1 << j)) d *= A[j];
            B.push_back(d);
        }
        sort(all(B)), B.erase(unique(all(B)), B.end());
        return B;
    }
};

struct csum {
    ll N;
    vector<ll> A, S;
    csum(vector<ll> v) : A(v), S(1) { each(k, v) S.push_back(k + S.back()); }
    ll sum(ll l, ll r) { return S[r] - S[l]; }
    ll lsum(ll r) { return S[r]; }
    ll rsum(ll l) { return S.back() - S[l]; }
};

signed main() {
    ll N;
    cin >> N;
    ll X[N], Y[N];
    char D[N];
    ll xmax[3], xmin[3], ymax[3], ymin[3];
    rep(i, 3) xmax[i] = ymax[i] = -INF, xmin[i] = ymin[i] = INF;
    rep(i, N) {
        cin >> X[i] >> Y[i] >> D[i];
        if (D[i] == 'U' || D[i] == 'D') {
            chmax(xmax[1], X[i]);
            chmin(xmin[1], X[i]);
        }
        if (D[i] == 'R' || D[i] == 'L') {
            chmax(ymax[1], Y[i]);
            chmin(ymin[1], Y[i]);
        }
        if (D[i] == 'R') {
            chmax(xmax[2], X[i]);
            chmin(xmin[0], X[i]);
        }
        if (D[i] == 'L') {
            chmax(xmax[0], X[i]);
            chmin(xmin[2], X[i]);
        }
        if (D[i] == 'U') {
            chmax(ymax[2], Y[i]);
            chmin(ymin[0], Y[i]);
        }
        if (D[i] == 'D') {
            chmax(ymax[0], Y[i]);
            chmin(ymin[2], Y[i]);
        }
    }
    vector<ll> T;
    auto F = [=](double t) {
        double XM = -INF, Xm = INF, YM = -INF, Ym = INF;
        chmax(XM, xmax[0] - t);
        chmax(XM, xmax[1] * 1.0);
        chmax(XM, xmax[2] + t);
        chmin(Xm, xmin[0] + t);
        chmin(Xm, xmin[1] * 1.0);
        chmin(Xm, xmin[2] - t);
        chmax(YM, ymax[0] - t);
        chmax(YM, ymax[1] * 1.0);
        chmax(YM, ymax[2] + t);
        chmin(Ym, ymin[0] + t);
        chmin(Ym, ymin[1] * 1.0);
        chmin(Ym, ymin[2] - t);
        return (XM - Xm) * (YM - Ym);
    };
    T.pb(0), T.pb(1LL << 32);
    if (xmax[0] > xmax[1]) T.pb(xmax[0] - xmax[1]);
    if (xmax[1] > xmax[2]) T.pb(xmax[1] - xmax[2]);
    if (xmin[0] < xmin[1]) T.pb(xmin[1] - xmin[0]);
    if (xmin[1] < xmin[2]) T.pb(xmin[2] - xmin[1]);
    if (ymax[0] > ymax[1]) T.pb(ymax[0] - ymax[1]);
    if (ymax[1] > ymax[2]) T.pb(ymax[1] - ymax[2]);
    if (ymin[0] < ymin[1]) T.pb(ymin[1] - ymin[0]);
    if (ymin[1] < ymin[2]) T.pb(ymin[2] - ymin[1]);
    sort(all(T)), T.erase(unique(all(T)), T.end());
    double res = INF;
    rep(i, T.size() - 1) {
        ll l = T[i] * 2, r = T[i + 1] * 2;
        while (r - l > 2) {
            ll m1 = (r - l) / 3 + l;
            ll m2 = (r - l) * 2 / 3 + l;
            ll t1 = F(m1 * 0.5), t2 = F(m2 * 0.5);
            if (t1 > t2) l = m1;
            if (t1 == t2) l = m1, r = m2;
            if (t1 < t2) r = m2;
        }
        rep(i, 3) chmin(res, F((l + i) * 0.5));
    }
    rep(i, T.size()) chmin(res, F(T[i]));
    cout << res << endl;
}


Measured memory_bytes: 1920