#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef long double ld;
#define DBG(v) cerr << #v << " = " << (v) << endl;

int n;
const int MxN = (int) 1e5 + 9;
int x[MxN + 9];
int y[MxN + 9];
char d[MxN + 9];

void rotate() {
    for (int i = 0; i < n; ++i) {
        swap(x[i], y[i]);
        if (d[i] == 'R')
            d[i] = 'U';
        else if (d[i] == 'U')
            d[i] = 'R';
        else if (d[i] == 'L')
            d[i] = 'D';
        else if (d[i] == 'D')
            d[i] = 'L';
        else
            assert(false);
    }
}

ld evalX(const ld amount) {
    assert(amount >= 0);
    ld mn = 1LL << 60, mx = -1LL << 60;

    for (int i = 0; i < n; ++i) {
        const ld curr = x[i] + (d[i] == 'L' ? -amount : d[i] == 'R' ? +amount : 0.0);
        mn = min(mn, curr);
        mx = max(mx, curr);
    }
    return mx - mn;
}

ld evalY(const ld amount) {
    rotate();
    ld res = evalX(amount);
    rotate();
    return res;
}

ld eval(const ld amount) {
    ld res1 = evalX(amount);
    ld res2 = evalY(amount);
    return res1 * res2;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr), cout.tie(nullptr);
    cout << fixed << setprecision(11);
    cerr << fixed << setprecision(2);

    cin >> n;
    for (int i = 0; i < n; ++i)
        cin >> x[i] >> y[i] >> d[i];

    const ll Inf = (ll) 5e8 + 9;
    set<ld> pts = {0, Inf};

    for (int rep = 0; rep < 2; ++rep) {

        auto mn = [&](const char c) {
            int res = Inf;
            for (int i = 0; i < n; ++i)
                if (d[i] == c)
                    res = min(res, x[i]);
            return res;
        };


        auto mx = [&](const char c) {
            int res = -Inf;
            for (int i = 0; i < n; ++i)
                if (d[i] == c)
                    res = max(res, x[i]);
            return res;
        };

        {
            const int mnR = mn('R');
            const int mnC = min(mn('U'), mn('D'));
            const int mnL = mn('L');
            pts.insert(abs(mnR - mnC));
            pts.insert(abs(mnL - mnC));
            pts.insert(abs(mnR - mnL) / 2.0);
        }
        {
            const int mxR = mx('R');
            const int mxC = max(mx('U'), mx('D'));
            const int mxL = mx('L');
            pts.insert(abs(mxR - mxC));
            pts.insert(abs(mxL - mxC));
            pts.insert(abs(mxR - mxL) / 2.0);
        }

        rotate();
    }

    assert(pts.size() >= 2);
    while (*pts.begin() < 0) {
        pts.erase(pts.begin());
        assert(pts.size() >= 2);
    }
    while (*--pts.end() > Inf) {
        pts.erase(--pts.end());
        assert(pts.size() >= 2);
    }

    ld res = 1e18;
    for (ld amount : pts) {
        res = min(res, eval(amount));

        const ld b1 = evalX(amount);
        const ld b2 = evalY(amount);
        const int a1 = round((evalX(amount + .2) - b1) / .2);
        const int a2 = round((evalY(amount + .2) - b2) / .2);
        if (!a1 || !a2) continue;
        const ld xx = (-b1 / a1 - b2 / a2) / 2;
        if (xx > 0) res = min(res, eval(amount + xx));
    }
/*
    for (auto it = pts.begin(); next(it) != pts.end(); ++it) {
        ld lo = *it;
        ld hi = *next(it);
        const ld eps = 1e-10;
        while (hi - lo > eps) {
            const ld mid1 = (2 * lo + hi) / 3.0;
            const ld mid2 = (lo + 2 * hi) / 3.0;
            if (eval(mid1) <= eval(mid2))
                hi = mid2;
            else
                lo = mid2;
        }

        res = min(res, eval((lo + hi) / 2));
    }
*/
/*

    for (ld i = 0; i < 1000; i += .1)
        cerr << i << ' ' << eval(i) << endl;
*/


    cout << res << endl;

    return 0;
}

Measured memory_bytes: 1152