#include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <string>
#include <tuple>
#include <vector>

using namespace std;

typedef long long ll;
constexpr ll MOD = 1000000007;

// struct UnionFind {
//     vector<int> par;
    
//     UnionFind(int N): par(N) {
//         for (int i=0;i<N;i++) par[i] = i;
//     }

//     int root(int x) {
//         if (par[x] == x) return x;
//         else return par[x] = root(par[x]);
//     }

//     void unite(int x, int y) {
//         int rx = root(x);
//         int ry = root(y);
//         if (rx == ry) return;
//         par[rx] = ry;
//     }

//     bool same(int x, int y) {
//         int rx = root(x);
//         int ry = root(y);
//         return rx == ry;
//     }
// };

constexpr ll INF = 1000000000;

void choosemin(ll x, ll y, ll z, vector<tuple<ll,ll,double>> &dst) {
    if (x == INF) { // y, z
        if (z == INF) dst.push_back(make_tuple(y,1,(double)INF));
        else if (y >= z) dst.push_back(make_tuple(z,-1,(double)INF)); // includes y == INF
        else { // z > y
            dst.push_back(make_tuple(y,1,(double)(z-y)/2));
            dst.push_back(make_tuple(z,-1,(double)INF));
        }
    } else if (y == INF) { // x, z
        if (z == INF) dst.push_back(make_tuple(x,0,(double)INF));
        else { // here x != INF
            if (z>x) dst.push_back(make_tuple(x,0,(double)(z-x)));
            dst.push_back(make_tuple(z,-1,(double)INF));
        }
    } else if (z == INF) { // x, y
        if (y >= x) dst.push_back(make_tuple(x,0,(double)INF)); // here x,y != INF
        else { // here y != INF; x > y
            dst.push_back(make_tuple(y,1,(double)(x-y)));
            dst.push_back(make_tuple(x,0,(double)INF));
        }
    } else if (x == y) { // x == y, z
        if (z > x) dst.push_back(make_tuple(x,0,(double)(z-x)));
        dst.push_back(make_tuple(z,-1,(double)INF)); // includes x == y == z
    } else if (y == z) { // x, y == z
        if (x < z) dst.push_back(make_tuple(x,0,(double)(z-x)));
        dst.push_back(make_tuple(z,-1,(double)INF));
    } else if (z == x) { // y, z == x
        if (y < z) dst.push_back(make_tuple(y,1,(double)(z-y)/2));
        dst.push_back(make_tuple(z,-1,(double)INF));
    } else { // here x, y, z != INF, x != y, y != z, z != x
        // x < y <= z -> x, z
        // x < z <= y -> x, z
        // y < x <= z -> y, (x, )z
        // y < z <= x -> y, z
        // z < x <= y -> z
        // z < y <= x -> z
        if (z < min(x,y)) dst.push_back(make_tuple(z,-1,(double)INF));
        else if (x < min(y,z)) { // x < y, x < z
            dst.push_back(make_tuple(x,0,(double)(z-x)));
            dst.push_back(make_tuple(z,-1,(double)INF));
        } else { // y < x, y < z
            if (z > x && x-y < z-x) {
                dst.push_back(make_tuple(y,1,(double)(x-y)));
                dst.push_back(make_tuple(x,0,(double)(z-x)));
                dst.push_back(make_tuple(z,-1,(double)INF));
            } else { // x-y >= z-x || x > z > y
                dst.push_back(make_tuple(y,1,(double)(z-y)/2));
                dst.push_back(make_tuple(z,-1,(double)INF));
            }
        }
    }
}

void choosemax(ll x, ll y, ll z, vector<tuple<ll,ll,double>> &dst) {
    if (x == -INF) { // y, z
        if (y == -INF) dst.push_back(make_tuple(z,-1,(double)INF));
        else if (y >= z) dst.push_back(make_tuple(y,1,(double)INF)); // includes z == -INF
        else { // z > y
            dst.push_back(make_tuple(z,-1,(double)(z-y)/2));
            dst.push_back(make_tuple(y,1,(double)INF));
        }
    } else if (y == -INF) { // x, z
        if (x >= z) dst.push_back(make_tuple(x,0,(double)INF)); // include z == -INF
        else { // here x != -INF; z > x
            dst.push_back(make_tuple(z,-1,(double)(z-x)));
            dst.push_back(make_tuple(x,0,(double)INF));
        }
    } else if (z == -INF) { // x, y
        if (x > y) dst.push_back(make_tuple(x,0,(double)(x-y)));
        dst.push_back(make_tuple(y,1,(double)INF));
    } else if (x == y) { // x == y, z
        if (z > y) dst.push_back(make_tuple(z,-1,(double)(z-y)/2));
        dst.push_back(make_tuple(y,1,(double)INF)); // includes x == y == z
    } else if (y == z) { // y == z, x
        if (x > y) dst.push_back(make_tuple(x,0,(double)(x-y)));
        dst.push_back(make_tuple(y,1,(double)INF));
    } else if (z == x) { // z == x, y
        if (z > y) dst.push_back(make_tuple(x,0,(double)(x-y)));
        dst.push_back(make_tuple(y,1,(double)INF));
    } else { // here x, y, z != INF
        // x < z < y -> y
        // z < x < y -> y
        // y < z < x -> x, y
        // z < y < x -> x, y
        // x < y < z -> z, y
        // y < x < z -> z, (x, )y
        if (y > max(x,z)) dst.push_back(make_tuple(y,1,(double)INF));
        else if (x > max(y,z)) { // x > y, x > z
            dst.push_back(make_tuple(x,0,(double)(x-y)));
            dst.push_back(make_tuple(y,1,(double)INF));
        } else { // z > x, z > y
            if (x > y && z-x < x-y) {
                dst.push_back(make_tuple(z,-1,(double)(z-x)));
                dst.push_back(make_tuple(x,0,(double)(x-y)));
                dst.push_back(make_tuple(y,1,(double)INF));
            } else { // z-x >= x-y || x > y
                dst.push_back(make_tuple(z,-1,(double)(z-y)/2));
                dst.push_back(make_tuple(y,1,(double)INF));
            }
        }
    }
}

int main(void) {
    int N;
    set<ll> xf, xr, xl, yf, yu, yd;
    cin >> N;
    for (int i=0;i<N;i++) {
        ll x, y;
        string s;
        cin >> x >> y >> s;
        switch (s[0]) {
            case 'U':
                xf.insert(x);
                yu.insert(y);
                break;
            case 'D':
                xf.insert(x);
                yd.insert(y);
                break;
            case 'L':
                xl.insert(x);
                yf.insert(y);
                break;
            case 'R':
                xr.insert(x);
                yf.insert(y);
                break;
            default:
                break;
        }
    }

    vector<tuple<ll,ll,double>> xmin, xmax, ymin, ymax;
    // x-min
    ll x = INF, y = INF, z = INF;
    if (xf.size() > 0) x = *(xf.begin());
    if (xr.size() > 0) y = *(xr.begin());
    if (xl.size() > 0) z = *(xl.begin());
    choosemin(x,y,z,xmin);

    // x-max
    x = -INF, y = -INF, z = -INF;
    if (xf.size() > 0) x = *(xf.rbegin());
    if (xr.size() > 0) y = *(xr.rbegin());
    if (xl.size() > 0) z = *(xl.rbegin());
    choosemax(x,y,z,xmax);

    // y-min
    x = INF, y = INF, z = INF;
    if (yf.size() > 0) x = *(yf.begin());
    if (yu.size() > 0) y = *(yu.begin());
    if (yd.size() > 0) z = *(yd.begin());
    choosemin(x,y,z,ymin);

    // y-max
    x = -INF, y = -INF, z = -INF;
    if (yf.size() > 0) x = *(yf.rbegin());
    if (yu.size() > 0) y = *(yu.rbegin());
    if (yd.size() > 0) z = *(yd.rbegin());
    choosemax(x,y,z,ymax);

#ifdef DEBUG
    cout << "xmin" << endl;
    for (auto itr: xmin) {
        cout << fixed << get<0>(itr) << ", " << get<1>(itr) << ", " << get<2>(itr) << endl;
    }
    cout << "xmax" << endl;
    for (auto itr: xmax) {
        cout << fixed << get<0>(itr) << ", " << get<1>(itr) << ", " << get<2>(itr) << endl;
    }
    cout << "ymin" << endl;
    for (auto itr: ymin) {
        cout << fixed << get<0>(itr) << ", " << get<1>(itr) << ", " << get<2>(itr) << endl;
    }
    cout << "ymax" << endl;
    for (auto itr: ymax) {
        cout << fixed << get<0>(itr) << ", " << get<1>(itr) << ", " << get<2>(itr) << endl;
    }
#endif

    auto itr1 = xmin.begin();
    auto itr2 = xmax.begin();
    auto itr3 = ymin.begin();
    auto itr4 = ymax.begin();
    double minimum = (get<0>(*itr2)-get<0>(*itr1))*(get<0>(*itr4)-get<0>(*itr3));
#ifdef DEBUG
        cout << fixed << 0 << ", " << minimum << endl;
#endif
    while (true) {
        double t = min({get<2>(*itr1),get<2>(*itr2),get<2>(*itr3),get<2>(*itr4)});
        if (abs(t-(double)INF)<1e-5) break;
        double box = ((get<0>(*itr2)+get<1>(*itr2)*t)-(get<0>(*itr1)+get<1>(*itr1)*t))*((get<0>(*itr4)+get<1>(*itr4)*t)-(get<0>(*itr3)+get<1>(*itr3)*t));
        minimum = min(minimum,box);
#ifdef DEBUG
        cout << fixed << t << ", " << box << endl;
#endif
        if (abs(t-get<2>(*itr1)) < 1e-5) itr1++;
        if (abs(t-get<2>(*itr2)) < 1e-5) itr2++;
        if (abs(t-get<2>(*itr3)) < 1e-5) itr3++;
        if (abs(t-get<2>(*itr4)) < 1e-5) itr4++;
    }
    cout << fixed << setprecision(10) << minimum << endl;

    return 0;
}


Measured memory_bytes: 9088