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

using ll = long long;

constexpr ll inf = 1e18;

enum {
    RIGHT,
    UP,
    LEFT,
    DOWN
};

constexpr int dx[4] = {1, 0, -1, 0};
constexpr int dy[4] = {0, 1, 0, -1};

template <typename F>
double ternary_search(F f, double lb, double ub) {
    double x0 = lb, x3 = ub;
    for(int lp = 0; lp < 200; ++lp) {
        const double x1 = (2 * x0 + x3) / 3;
        const double x2 = (x0 + 2 * x3) / 3;
        if(f(x1) > f(x2)) {
            x0 = x1;
        } else {
            x3 = x2;
        }
    }
    return x0;
}

int main() {
    int n; cin >> n;
    vector<ll> x(n), y(n), d(n);
    for(int i = 0; i < n; ++i) {
        char c;
        cin >> x[i] >> y[i] >> c;
        if(c == 'R') d[i] = RIGHT;
        if(c == 'L') d[i] = LEFT;
        if(c == 'U') d[i] = UP;
        if(c == 'D') d[i] = DOWN;
    }

    vector<ll> min_y_d(4, inf), max_y_d(4, -inf);
    vector<ll> min_x_d(4, inf), max_x_d(4, -inf);
    for(int i = 0; i < n; ++i) {
        min_x_d[d[i]] = min(min_x_d[d[i]], x[i]);
        max_x_d[d[i]] = max(max_x_d[d[i]], x[i]);
        min_y_d[d[i]] = min(min_y_d[d[i]], y[i]);
        max_y_d[d[i]] = max(max_y_d[d[i]], y[i]);
    }

    auto calc = [&] (double t) {
        double min_x = inf, max_x = -inf;
        double min_y = inf, max_y = -inf;
        for(int i = 0; i < n; ++i) {
            min_x = min(min_x, x[i] + dx[d[i]] * t);
            max_x = max(max_x, x[i] + dx[d[i]] * t);
            min_y = min(min_y, y[i] + dy[d[i]] * t);
            max_y = max(max_y, y[i] + dy[d[i]] * t);
        }
        //cout << max_x << " " << min_x << " " << max_y << " " << min_y << endl;
        return (max_x - min_x) * (max_y - min_y);
    };

    vector<double> cand_t = {0};
    // xmax
    cand_t.push_back(abs(max(max_x_d[DOWN], max_x_d[UP]) - max_x_d[RIGHT]));
    cand_t.push_back(abs(max(max_x_d[DOWN], max_x_d[UP]) - max_x_d[LEFT]));
    cand_t.push_back(abs(max_x_d[LEFT] - max_x_d[RIGHT]) / 2.0);
    // xmin
    cand_t.push_back(abs(min(min_x_d[DOWN], min_x_d[UP]) - min_x_d[LEFT]));
    cand_t.push_back(abs(min(min_x_d[DOWN], min_x_d[UP]) - min_x_d[RIGHT]));
    cand_t.push_back(abs(min_x_d[RIGHT] - min_x_d[LEFT]) / 2.0);
    // ymax
    cand_t.push_back(abs(max(max_y_d[LEFT], max_y_d[RIGHT]) - max_y_d[UP]));
    cand_t.push_back(abs(max(max_y_d[LEFT], max_y_d[RIGHT]) - max_y_d[DOWN]));
    cand_t.push_back(abs(max_y_d[DOWN] - max_y_d[UP]) / 2.0);
    // ymin
    cand_t.push_back(abs(min(min_y_d[LEFT], min_y_d[RIGHT]) - min_y_d[DOWN]));
    cand_t.push_back(abs(min(min_y_d[LEFT], min_y_d[RIGHT]) - min_y_d[UP]));
    cand_t.push_back(abs(min_y_d[DOWN] - min_y_d[UP]) / 2.0);

    sort(cand_t.begin(), cand_t.end());
    cand_t.erase(unique(cand_t.begin(), cand_t.end()), cand_t.end());
    while(cand_t.back() > 1e16) cand_t.pop_back();

    double ans = inf;
    for(int i = 0; i < (int)cand_t.size(); ++i) {
        //cout << cand_t[i] << endl;
        ans = min(ans, calc(cand_t[i]));
        if(i + 1 != (int)cand_t.size()) {
            ans = min(ans, calc(ternary_search(calc, cand_t[i], cand_t[i + 1])));
        }
    }

    cout << fixed << setprecision(12) << ans << endl;
}


Measured memory_bytes: 2560