// Original C++ solution (slower):
#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(10) << setiosflags(ios::fixed);



    int n;

    cin >> n;



    vector<double> x(n), y(n), dx(n), dy(n);

    for (int i = 0; i < n; ++i) {

        char d;

        cin >> x[i] >> y[i] >> d;



        if (d == 'R') dx[i] = 1;

        else if (d == 'L') dx[i] = -1;

        else if (d == 'U') dy[i] = 1;

        else if (d == 'D') dy[i] = -1;

    }



    const double INF = numeric_limits<double>::max();

    const double NINF = numeric_limits<double>::lowest();



    auto f = [&](const ld t) {

        pair<double, double> seg_x(INF, NINF), seg_y(INF, NINF);



        for (int i = 0; i < n; ++i) {

            double vx = x[i] + t * dx[i], vy = y[i] + t * dy[i];



            seg_x.first = min(seg_x.first, vx);

            seg_x.second = max(seg_x.second, vx);

            seg_y.first = min(seg_y.first, vy);

            seg_y.second = max(seg_y.second, vy);

        }

        return (seg_x.second - seg_x.first) * (seg_y.second - seg_y.first);

    };



    double min_v = f(0), lb = 0, ub = 1e9;

    for (int i = 0; i < 200; ++i) {

        const double t1 = (2.0 * lb + ub) / 3.0;

        const double t2 = (lb + 2.0 * ub) / 3.0;



        min_v = min(min_v, f(t1));

        min_v = min(min_v, f(t2));



        if (f(t1) > f(t2)) lb = t1;

        else ub = t2;

    }



    cout << min_v << endl;



    return 0;

}


// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>



using namespace std;



using ll = long long;



int main() {

    cin.tie(0); ios::sync_with_stdio(false);

    cout << setprecision(10) << setiosflags(ios::fixed);



    int n;

    cin >> n;



    // xy[0] = -, xy[1] = 0, xy[2] = +

    // xy[i][0] は最小値，xy[i][1] は最大値

    vector<vector<double>> x(3), y(3);

    for (int i = 0; i < n; ++i) {

        double xx, yy;

        char d;

        cin >> xx >> yy >> d;



        int idx_x = 1, idx_y = 1;

        if (d == 'R') idx_x = 2;

        else if (d == 'L') idx_x = 0;

        else if (d == 'U') idx_y = 2;

        else if (d == 'D') idx_y = 0;



        if (x[idx_x].size() == 0) { x[idx_x].push_back(xx); x[idx_x].push_back(xx); }

        else { x[idx_x][0] = min(x[idx_x][0], xx); x[idx_x][1] = max(x[idx_x][1], xx); }



        if (y[idx_y].size() == 0) { y[idx_y].push_back(yy); y[idx_y].push_back(yy); }

        else { y[idx_y][0] = min(y[idx_y][0], yy); y[idx_y][1] = max(y[idx_y][1], yy); }

    }



    vector<double> times = {0};

    for (auto x_i : x[0]) for (auto x_j : x[1]) if (x_j < x_i) times.push_back(x_i - x_j); // x_i - t = x_j

    for (auto x_i : x[0]) for (auto x_j : x[2]) if (x_j < x_i) times.push_back(0.5 * (x_i - x_j)); // x_i - t = x_j + t

    for (auto x_i : x[1]) for (auto x_j : x[2]) if (x_j < x_i) times.push_back(x_i - x_j); // x_i = x_j + t



    for (auto y_i : y[0]) for (auto y_j : y[1]) if (y_j < y_i) times.push_back(y_i - y_j);

    for (auto y_i : y[0]) for (auto y_j : y[2]) if (y_j < y_i) times.push_back(0.5 * (y_i - y_j));

    for (auto y_i : y[1]) for (auto y_j : y[2]) if (y_j < y_i) times.push_back(y_i - y_j);





    const double INF = numeric_limits<double>::max();

    const double NINF = numeric_limits<double>::lowest();



    auto f = [&](const double t) {

        pair<double, double> seg_x(INF, NINF), seg_y(INF, NINF);



        for (int i = 0; i < 3; ++i) {

            for (auto x_i : x[i]) {

                seg_x.first = min(seg_x.first, x_i + (i - 1) * t);

                seg_x.second = max(seg_x.second, x_i + (i - 1) * t);

            }

            for (auto y_i : y[i]) {

                seg_y.first = min(seg_y.first, y_i + (i - 1) * t);

                seg_y.second = max(seg_y.second, y_i + (i - 1) * t);

            }

        }

        return (seg_x.second - seg_x.first) * (seg_y.second - seg_y.first);

    };



    sort(times.begin(), times.end());



    double min_v = f(0);

    for (size_t i = 0; i + 1 < times.size(); ++i) {

        double lb = times[i], ub = times[i + 1];



        for (int i = 0; i < 200; ++i) {

            const double t1 = (2.0 * lb + ub) / 3.0;

            const double t2 = (lb + 2.0 * ub) / 3.0;



            if (f(t1) > f(t2)) lb = t1;

            else ub = t2;

        }



        min_v = min(min_v, f(lb));

    }



    cout << min_v << endl;



    return 0;

}


// Fastest known solution for this problem: