// 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.3836925689613675x):
#include <bits/stdc++.h>



using namespace std;



using ll = long long;

using ld = long double;



struct MinimumBoundingBox {

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

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



    int n;

    vector<double> x, y;

    vector<char> d;



    MinimumBoundingBox(int _n) : n(_n), x(n), y(n), d(n) {}



    void input() {

        for (int i = 0; i < n; ++i) cin >> x[i] >> y[i] >> d[i];

    }



    ld solve() {

        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;

        }

        return min_v;

    }



    double f(const double t) {

        pair<double, double> dx(INF, NINF), dy(INF, NINF);

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

            double 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;



            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);

    }

};



int main() {

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

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



    int n;

    cin >> n;



    MinimumBoundingBox mbb(n);

    mbb.input();

    cout << mbb.solve() << endl;



    return 0;

}