#include <bits/stdc++.h>
 
using namespace std;
 
vector<pair<int, int>> minimize(vector<pair<int, int>>& zs) {
    int inf = 1000000000;
    vector<pair<int, int>> minimized;
    for (int dz = -1; dz <= 1; ++dz) {
        int lo = inf, hi = -inf;
        for (auto z : zs) {
            if (z.first == dz) {
                lo = min(lo, z.second);
                hi = max(hi, z.second);
            }
        }
        if (lo != inf) {
            minimized.push_back(make_pair(dz, lo));
            if (lo != hi) {
                minimized.push_back(make_pair(dz, hi));
            }
        }
    }
    return minimized;
}
 
vector<int> cuts(vector<pair<int, int>>& zs) {
    vector<int> result;
    for (auto z1 : zs) {
        for (auto z2 : zs) {
            if (z1.first == z2.first) {
                continue;
            }
            // z1.first * t + 2*z1.second == z2.first * t + 2*z2.second
            // <=>
            // t = 2(z2.second - z1.second)/(z1.first - z2.first)
            int t = 2 * (z2.second - z1.second) / (z1.first - z2.first);
            if (t < 0) {
                continue;
            }
            result.push_back(t);
        }
    }
    return result;
}
 
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    vector<pair<int, int>> xs(n), ys(n);
    for (int i = 0; i < n; ++i) {
        int x, y;
        char d;
        cin >> x >> y >> d;
        if (d == 'R') {
            xs[i] = make_pair(1, x);
            ys[i] = make_pair(0, y);
        } else if (d == 'L') {
            xs[i] = make_pair(-1, x);
            ys[i] = make_pair(0, y);
        } else if (d == 'U') {
            xs[i] = make_pair(0, x);
            ys[i] = make_pair(1, y);
        } else if (d == 'D') {
            xs[i] = make_pair(0, x);
            ys[i] = make_pair(-1, y);
        }
    }
    xs = minimize(xs);
    ys = minimize(ys);
    vector<int> x_cuts = cuts(xs);
    vector<int> y_cuts = cuts(ys);
    vector<int> all_cuts = {0};
    all_cuts.insert(all_cuts.end(), x_cuts.begin(), x_cuts.end());
    all_cuts.insert(all_cuts.end(), y_cuts.begin(), y_cuts.end());
    sort(all_cuts.begin(), all_cuts.end());
    all_cuts.resize(unique(all_cuts.begin(), all_cuts.end()) - all_cuts.begin());
    long long inf = 1000000000000000000LL;
    auto calc = [&](int t) {
        long long result = 1LL;
        for (auto& zs : {xs, ys}) {
            long long lo = inf, hi = -inf;
            for (auto& z : zs) {
                lo = min(lo, (long long) z.first * t + 2*z.second);
                hi = max(hi, (long long) z.first * t + 2*z.second);
            }
            result *= (hi-lo);
        }
        return result;
    };
    function<long long (int, int)> optimize = [&](int a, int b) {
        assert (a <= b);
        if (b - a <= 20) {
            long long best = calc(a);
            for (int i = a+1; i <= b; ++i) {
                best = min(best, calc(i));
            }
            return best;
        }
        int c = (2*a+b)/3, d = (a+2*b)/3;
        long long calc_c = calc(c), calc_d = calc(d);
        if (calc_c < calc_d) {
            return optimize(a, d);
        } else {
            return optimize(c, b);
        }
    };
    long long best = calc(0);
    for (int cut : all_cuts) {
        best = min(best, calc(cut));
    }
    auto t0 = clock();
    for (int i = 0; i+1 < (int)all_cuts.size(); ++i) {
        best = min(best, optimize(all_cuts[i], all_cuts[i+1]));
    }
    cout << setprecision(30) << (long double) best / 4. << endl;
    cerr << "time used: " << (clock() - t0) << endl;
    return 0;
}

Measured memory_bytes: 1792