// 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<double> 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<double, double> dx, dy;

        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;



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

    };



    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;

}


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



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



    void input() {

        char d;

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

            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;

        }

    }



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

    }

};



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;

}