#include"bits/stdc++.h"
using namespace std;
using ll = int64_t;

int main() {
    ll N;
    cin >> N;
    vector<double> x(N), y(N);
    vector<char> d(N);
    for (ll i = 0; i < N; i++) {
        cin >> x[i] >> y[i] >> d[i];
        if (d[i] == 'R') {
            d[i] = 0;
        } else if (d[i] == 'L') {
            d[i] = 1;
        } else if (d[i] == 'U') {
            d[i] = 2;
        } else if (d[i] == 'D') {
            d[i] = 3;
        } else {
            assert(false);
        }
    }

    enum {
        RIGHT, LEFT, UP, DOWN, DIR_NUM
    };

    vector<double> x_max(DIR_NUM, LLONG_MIN);
    vector<double> x_min(DIR_NUM, LLONG_MAX);
    vector<double> y_max(DIR_NUM, LLONG_MIN);
    vector<double> y_min(DIR_NUM, LLONG_MAX);
    for (ll i = 0; i < N; i++) {
        x_max[d[i]] = max(x_max[d[i]], x[i]);
        x_min[d[i]] = min(x_min[d[i]], x[i]);
        y_max[d[i]] = max(y_max[d[i]], y[i]);
        y_min[d[i]] = min(y_min[d[i]], y[i]);
    }

    set<double> candidates;

    {
        double const_x = max(x_max[UP], x_max[DOWN]);
        double left = x_max[LEFT] - const_x;
        double right = const_x - x_max[RIGHT];
        if (left >= right) {
            candidates.insert(max((x_max[LEFT] - x_max[RIGHT]) / 2, 0.0));
        } else {
            candidates.insert(max(left, 0.0));
            candidates.insert(max(right, 0.0));
        }
    }
    {
        double const_x = min(x_min[UP], x_min[DOWN]);
        double right = x_min[LEFT] - const_x;
        double left = const_x - x_min[RIGHT];
        if (left >= right) {
            candidates.insert(max((x_min[LEFT] - x_min[RIGHT]) / 2, 0.0));
        } else {
            candidates.insert(max(left, 0.0));
            candidates.insert(max(right, 0.0));
        }
    }
    {
        double const_y = max(y_max[RIGHT], y_max[LEFT]);
        double left = y_max[DOWN] - const_y;
        double right = const_y - y_max[UP];
        if (left >= right) {
            candidates.insert(max((y_max[DOWN] - y_max[UP]) / 2, 0.0));
        } else {
            candidates.insert(max(left, 0.0));
            candidates.insert(max(right, 0.0));
        }
    }
    {
        double const_y = min(y_min[RIGHT], y_min[LEFT]);
        double right = y_min[DOWN] - const_y;
        double left = const_y - y_min[UP];
        if (left >= right) {
            candidates.insert(max((y_min[DOWN] - y_min[UP]) / 2, 0.0));
        } else {
            candidates.insert(max(left, 0.0));
            candidates.insert(max(right, 0.0));
        }
    }

    auto x_max_at = [&](double time){
        return max({ x_max[RIGHT] + time, x_max[LEFT] - time, x_max[UP], x_max[DOWN] });
    };
    auto x_min_at = [&](double time){
        return min({ x_min[RIGHT] + time, x_min[LEFT] - time, x_min[UP], x_min[DOWN] });
    };
    auto y_max_at = [&](double time){
        return max({ y_max[RIGHT], y_max[LEFT], y_max[UP] + time, y_max[DOWN] - time });
    };
    auto y_min_at = [&](double time){
        return min({ y_min[RIGHT], y_min[LEFT], y_min[UP] + time, y_min[DOWN] - time });
    };
    auto score = [&](double time){
        return (x_max_at(time) - x_min_at(time)) * (y_max_at(time) - y_min_at(time));
    };
    
    double ans = LLONG_MAX;
    for (auto candidate : candidates) {
        ans = min(ans, score(candidate));
    }

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


Measured memory_bytes: 1920