#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using ld = long double;

int main() {
    cin.tie(0); ios::sync_with_stdio(false);
    cout << setprecision(15) << setiosflags(ios::fixed);

    int n;
    cin >> n;

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

    auto f = [&](const ld t) {
        pair<ld, ld> dx, dy;
        for (int i = 0; i < n; ++i) {
            ld vx = x[i], vy = y[i];

            if (d[i] == 'R') vx += t;
            else if (d[i] == 'L') vx -= t;
            else if (d[i] == 'U') vy += t;
            else if (d[i] == 'D') vy -= t;

            if (i == 0) {
                dx = make_pair(vx, vx);
                dy = make_pair(vy, vy);
            }
            else {
                dx.first = min(dx.first, vx);
                dx.second = max(dx.second, vx);
                dy.first = min(dy.first, vy);
                dy.second = max(dy.second, vy);
            }
        }
        return (dx.second - dx.first) * (dy.second - dy.first);
    };

    ld v = f(0), lb = 0, ub = 2 * 1e9;
    for (int i = 0; i < 200; ++i) {
        const ld t1 = (2.0 * lb + ub) / 3.0;
        const ld t2 = (lb + 2.0 * ub) / 3.0;

        v = min(v, f(t1));
        v = min(v, f(t2));

        if (f(t1) > f(t2)) lb = t1;
        else ub = t2;
    }

    // cout << f(lb) << endl;
    cout << v << endl;

    return 0;
}
