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

#define TRACE(x) x
#define WATCH(x) TRACE(cout << #x" = " << x << endl)
#define WATCHR(a, b) TRACE(for (auto it=a; it!=b;) cout << *(it++) << " "; cout << endl)
#define WATCHC(V) TRACE({cout << #V" = "; WATCHR(V.begin(), V.end());})

#define sz(x) int((x).size())
#define all(x) (x).begin(), (x).end()

using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vb = vector<bool>;
using vs = vector<string>;

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0), cout.tie(0);

    string dirs = "UDLR";
    const int U = 0, D = 1, L = 2, R = 3;

    int N;
    cin >> N;

    vi x(N), y(N); vector<char> dir(N);

    vvi xg(4), yg(4);
    for (int i = 0; i < N; i++) {
        cin >> x[i] >> y[i] >> dir[i];
        xg[dirs.find(dir[i])].push_back(x[i]);
        yg[dirs.find(dir[i])].push_back(y[i]);
    }

    vector<double> eval = { 0 };
    { // bottom boundary
        int c = INT_MAX;
        if (sz(yg[L])) c = min(c, *min_element(all(yg[L])));
        if (sz(yg[R])) c = min(c, *min_element(all(yg[R])));

        int u = INT_MAX;
        if (sz(yg[U])) u = min(u, *min_element(all(yg[U])));

        int d = INT_MAX;
        if (sz(yg[D])) d = min(d, *min_element(all(yg[D])));

        if (u != INT_MAX && c != INT_MAX) eval.push_back(abs(c - u));
        if (d != INT_MAX && c != INT_MAX) eval.push_back(abs(d - c));
        if (u != INT_MAX && d != INT_MAX) eval.push_back(abs(d - u)/2.);
    }
    { // top boundary
        int c = INT_MIN;
        if (sz(yg[L])) c = max(c, *max_element(all(yg[L])));
        if (sz(yg[R])) c = max(c, *max_element(all(yg[R])));

        int u = INT_MIN;
        if (sz(yg[U])) u = max(u, *max_element(all(yg[U])));

        int d = INT_MIN;
        if (sz(yg[D])) d = max(d, *max_element(all(yg[D])));

        if (u != INT_MIN && c != INT_MIN) eval.push_back(abs(c - u));
        if (d != INT_MIN && c != INT_MIN) eval.push_back(abs(d - c));
        if (u != INT_MIN && d != INT_MIN) eval.push_back(abs(d - u)/2.);
    }

    { // left boundary
        int c = INT_MAX;
        if (sz(xg[U])) c = min(c, *min_element(all(xg[U])));
        if (sz(xg[D])) c = min(c, *min_element(all(xg[D])));

        int u = INT_MAX;
        if (sz(xg[R])) u = min(u, *min_element(all(xg[R])));

        int d = INT_MAX;
        if (sz(xg[L])) d = min(d, *min_element(all(xg[L])));

        if (u != INT_MAX && c != INT_MAX) eval.push_back(abs(c - u));
        if (d != INT_MAX && c != INT_MAX) eval.push_back(abs(d - c));
        if (u != INT_MAX && d != INT_MAX) eval.push_back(abs(d - u)/2.);
    }
    { // right boundary
        int c = INT_MIN;
        if (sz(xg[U])) c = max(c, *max_element(all(xg[U])));
        if (sz(xg[D])) c = max(c, *max_element(all(xg[D])));

        int u = INT_MIN;
        if (sz(xg[L])) u = max(u, *max_element(all(xg[L])));

        int d = INT_MIN;
        if (sz(xg[R])) d = max(d, *max_element(all(xg[R])));

        if (u != INT_MIN && c != INT_MIN) eval.push_back(abs(c - u));
        if (d != INT_MIN && c != INT_MIN) eval.push_back(abs(d - c));
        if (u != INT_MIN && d != INT_MIN) eval.push_back(abs(d - u)/2.);
    }

    auto check = [&](double tr) {
        vector<double> dims = { INT_MAX, INT_MIN, INT_MAX, INT_MIN };
        for (int i = 0; i < N; i++) {
            double xx = x[i], yy = y[i];
            if (dir[i] == 'U') yy += tr;
            if (dir[i] == 'D') yy -= tr;
            if (dir[i] == 'L') xx -= tr;
            if (dir[i] == 'R') xx += tr;

            dims[0] = min(dims[0], xx);
            dims[1] = max(dims[1], xx);
            dims[2] = min(dims[2], yy);
            dims[3] = max(dims[3], yy);
        }
        return (dims[1] - dims[0]) * (dims[3] - dims[2]);
    };

    double ans = DBL_MAX;
    for (double t : eval) {
        for (double tr = max(0., t - 1.); tr <= t + 1 + 1e-9; tr += 0.5) {
            ans = min(ans, check(tr));
        }
    }

    sort(all(eval));
    double last = 0;
    for (double t : eval) {
        if (t > last + 1e-9) {
            double lo = last, hi = t;
            for (int iter = 0; iter < 100; iter++) {
                double c1 = check((2 * lo + hi) / 3);
                ans = min(ans, c1);
                double c2 = check((lo + 2 * hi) / 3);
                ans = min(ans, c2);
                if (c1 < c2) hi = c2;
                else lo = c1;
            }
            last = t;
        }
    }

    cout << setprecision(15);
    cout << ans << endl;

    return 0;
}



Measured memory_bytes: 2304