#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "debug.h"
#else
#define dump(...)
#endif
#define endl '\n'
//#define int long long
#define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define REP(i, x) for (int i = 0; i < (int)(x); i++)
#define REPS(i, x) for (int i = 1; i <= (int)(x); i++)
#define RREP(i, x) for (int i = ((int)(x)-1); i >= 0; i--)
#define RREPS(i, x) for (int i = ((int)(x)); i > 0; i--)
#define INF 2147483647
#define LLINF 9223372036854775807LL
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define BIT(n) (1LL << (n))
#define TOUPPER(s) transform(s.begin(), s.end(), s.begin(), ::toupper)
#define TOLOWER(s) transform(s.begin(), s.end(), s.begin(), ::tolower)
#define FILLZERO(s, n)                      \
    do {                                    \
        ostringstream os;                   \
        os << setw(n) << setfill('0') << s; \
        s = os.str();                       \
    } while (0);
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end()) //sortしてからつかうこと
#define INIT                               \
    std::cin.tie(nullptr);                 \
    std::ios_base::sync_with_stdio(false); \
    cout << std::fixed << std::setprecision(10);

using ll = long long;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using pi = pair<int, int>;
template <typename T>
using Pq = priority_queue<T>;
template <typename T>
using pQ = priority_queue<T, vector<T>, greater<T>>;

template <typename T>
vector<T> make_vec(size_t a, T n) { return vector<T>(a, n); }
template <typename T, typename... Ts>
auto make_vec(size_t a, Ts... ts) { return vector<decltype(make_vec<T>(ts...))>(a, make_vec<T>(ts...)); }
template <class T>
inline bool chmax(T &a, T b) {
    if (a < b) {
        a = b;
        return 1;
    }
    return 0;
}
template <class T>
inline bool chmin(T &a, T b) {
    if (a > b) {
        a = b;
        return 1;
    }
    return 0;
}
template <typename T>
istream &operator>>(istream &is, vector<T> &vec) {
    for (T &x : vec)
        is >> x;
    return is;
}

constexpr ll MOD = 1e9 + 7;
int dx[8] = {1, 0, -1, 0, 1, 1, -1, -1};
int dy[8] = {0, 1, 0, -1, 1, -1, 1, -1};
ll A, B, C, D, E, F, G, H, N, M, L, K, P, Q, R, W, X, Y, Z;
string S, T;
ll ans = 0;

signed main() {
    INIT;
    cin >> N;
    vector<ll> mxX(3, -INF), mxY(3, -INF), mnX(3, INF), mnY(3, INF);
    REP(i, N) {
        char c;
        cin >> X >> Y >> c;
        if (c == 'R') {
            chmax(mxX[2], X);
            chmin(mnX[2], X);
            chmax(mxY[1], Y);
            chmin(mnY[1], Y);
        } else if (c == 'L') {
            chmax(mxX[0], X);
            chmin(mnX[0], X);
            chmax(mxY[1], Y);
            chmin(mnY[1], Y);
        } else if (c == 'U') {
            chmax(mxX[1], X);
            chmin(mnX[1], X);
            chmax(mxY[2], Y);
            chmin(mnY[2], Y);
        } else {
            chmax(mxX[1], X);
            chmin(mnX[1], X);
            chmax(mxY[0], Y);
            chmin(mnY[0], Y);
        }
    }
    vector<double> t;
    t.push_back(0);
    auto f = [&](vector<ll> &m) {
        REP(i, 3) {
            FOR(j, i, 3) {
                if (abs(m[i]) == INF || abs(m[j]) == INF) {
                    continue;
                }
                int vi = i - 1;
                int vj = j - 1;
                double tmp = double(m[i] - m[j]) / (vj - vi);
                if (tmp > 0) {
                    t.push_back(tmp);
                }
            }
        }
    };
    f(mxX), f(mnX), f(mxY), f(mnY);
    sort(ALL(t));
    UNIQUE(t);
    dump(t, mxX, mnX, mxY, mnY);
    double inf = numeric_limits<double>::max();
    double ans = inf;
    REP(i, t.size()) {
        double hx = -inf, lx = inf, hy = -inf, ly = inf;
        REP(j, 3) {
            chmax(hx, mxX[j] + t[i] * (j - 1));
            chmin(lx, mnX[j] + t[i] * (j - 1));
            chmax(hy, mxY[j] + t[i] * (j - 1));
            chmin(ly, mnY[j] + t[i] * (j - 1));
        }
        chmin(ans, (hx - lx) * (hy - ly));
    }
    cout << ans << endl;
}

Measured memory_bytes: 3844