// Slower C++ solution:
#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<ld> x(n), y(n);

    vector<char> d(n);

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

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



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

        pair<ld, ld> dx, dy;

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

            ld vx = x[i], vy = y[i];



            if (d[i] == 'R') vx += t;

            else if (d[i] == 'L') vx -= t;

            else if (d[i] == 'U') vy += t;

            else if (d[i] == 'D') vy -= t;



            if (i == 0) {

                dx = make_pair(vx, vx);

                dy = make_pair(vy, vy);

            }

            else {

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

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

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

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

            }

        }

        return (dx.second - dx.first) * (dy.second - dy.first);

    };



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

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

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

        const ld 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;

}


// Faster C++ solution for the same problem (measured speedup: 1.2580130680680992x):
#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;

}