#include <bits/stdc++.h>

#define all(x) x.begin(), x.end()

using namespace std;

typedef long long ll;
typedef vector<ll> dlist;
typedef vector<dlist> matrix;

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

    cout << setprecision(10) << fixed;

    int n;
    cin >> n;

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

    auto move = [&](int idx, double t){
        double a = 1.0 * x[idx] + (d[idx] == 'R') * t - (d[idx] == 'L') * t;
        double b = 1.0 * y[idx] + (d[idx] == 'U') * t - (d[idx] == 'D') * t;
        return pair<double, double>(a, b);
    };

    auto calc = [&](double t){
        auto v = move(0, t);
        vx[0] = vx[1] = v.first;
        vy[0] = vy[1] = v.second;
        for(int i= 0; i < n; ++i){
            v = move(i, t);
            vx[0] = min(vx[0], v.first);
            vx[1] = max(vx[1], v.first);
            vy[0] = min(vy[0], v.second);
            vy[1] = max(vy[1], v.second);
        }
        return (vx[1] - vx[0]) * (vy[1] - vy[0]);
    };

    double lo = 0, hi = 1e11, m1, m2, step, v1, v2;
    for(int i = 0; i <= 150; ++i){
        step = (hi - lo) / 3;
        m1 = lo + step;
        m2 = hi - step;

        v1 = calc(m1);
        v2 = calc(m2); 
        if(v1 < v2)
            hi = m2;
        else
            lo = m1;
    }
    cout << calc(lo) << "\n";

    return 0;
}//RUL0