#include <cstdio>
#include <algorithm>
#include <vector>
#include <set>
#include <cmath>
#include <string>
#include <iostream>
#include <stack>
#include <tuple>
#include <map>
#include <cassert>

using namespace std;
typedef long long ll;

double calc_area(const ll state_v[2][2], const ll state_d[2][2], double time){
    assert(time >= 0);
    const double xmin = state_v[0][0] + (state_d[0][0] - 1) * time;
    const double xmax = state_v[0][1] + (state_d[0][1] - 1) * time;
    assert(xmin <= xmax);
    const double ymin = state_v[1][0] + (state_d[1][0] - 1) * time;
    const double ymax = state_v[1][1] + (state_d[1][1] - 1) * time;
    assert(ymin <= ymax);
    return (xmax - xmin) * (ymax - ymin);
}

int main(){
    ll n;
    cin >> n;

    const ll ABSMAX = 100000000;
    const ll LBVAL = - ABSMAX - 1;
    const ll UBVAL = ABSMAX + 1;
    ll v[2][2][3]; // xy, min-max, dec-const-inc

    for(int xy = 0; xy < 2; ++xy){
        for(int minmax = 0; minmax < 2; ++minmax){
            for(int k = 0; k < 3; ++k){
                v[xy][minmax][k] = (minmax == 0) ? UBVAL : LBVAL;
            }
        }
    }

    map<char, ll> x_c2i = {{'U', 1}, {'D', 1}, {'L', 0}, {'R', 2}};
    map<char, ll> y_c2i = {{'U', 2}, {'D', 0}, {'L', 1}, {'R', 1}};

    for(ll i = 0; i < n; ++i){
        ll x, y; char d;
        cin >> x >> y >> d;
        v[0][0][x_c2i[d]] = min(v[0][0][x_c2i[d]], x);
        v[0][1][x_c2i[d]] = max(v[0][1][x_c2i[d]], x);
        v[1][0][y_c2i[d]] = min(v[1][0][y_c2i[d]], y);
        v[1][1][y_c2i[d]] = max(v[1][1][y_c2i[d]], y);
    }

    // time, type(x or y),  coord at t=0, direction
    vector<tuple<double, ll, ll, ll, ll> > events;

    for(ll xy = 0; xy < 2; ++xy){
        for(ll minmax = 0; minmax < 2; ++minmax){
            const int DEC = (minmax == 0) ? 2 : 0;
            const int INC = (minmax == 0) ? 0 : 2;
            const ll NAVAL = (minmax == 0) ? UBVAL : LBVAL;
            const ll SIGN = (minmax == 0) ? -1 : 1;

            if(v[xy][minmax][DEC] != NAVAL && v[xy][minmax][1] != NAVAL){
                events.push_back(make_tuple(
                    SIGN * ((double)v[xy][minmax][DEC] - (double)v[xy][minmax][1]),
                    xy, v[xy][minmax][1], minmax, 1));
            }
            if(v[xy][minmax][DEC] != NAVAL && v[xy][minmax][INC] != NAVAL){
                events.push_back(make_tuple(
                    SIGN * ((double)v[xy][minmax][DEC] - (double)v[xy][minmax][INC]) / 2.0,
                    xy, v[xy][minmax][INC], minmax, INC));
            }
            if(v[xy][minmax][1] != NAVAL && v[xy][minmax][INC] != NAVAL){
                events.push_back(make_tuple(
                    SIGN * ((double)v[xy][minmax][1] - (double)v[xy][minmax][INC]),
                    xy, v[xy][minmax][INC], minmax, INC));
            }
        }
    }

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

    ll state_v[2][2];
    ll state_d[2][2];
    for(ll xy = 0; xy < 2; ++xy){
        // min
        if(v[xy][0][2] <= min(v[xy][0][0], v[xy][0][1])){
            state_v[xy][0] = v[xy][0][2];
            state_d[xy][0] = 2;
        }
        if(v[xy][0][1] <= min(v[xy][0][0], v[xy][0][2])){
            state_v[xy][0] = v[xy][0][1];
            state_d[xy][0] = 1;
        }
        if(v[xy][0][0] <= min(v[xy][0][1], v[xy][0][2])){
            state_v[xy][0] = v[xy][0][0];
            state_d[xy][0] = 0;
        }

        // max
        if(v[xy][1][0] >= max(v[xy][1][1], v[xy][1][2])){
            state_v[xy][1] = v[xy][1][0];
            state_d[xy][1] = 0;
        }
        if(v[xy][1][1] >= max(v[xy][1][0], v[xy][1][2])){
            state_v[xy][1] = v[xy][1][1];
            state_d[xy][1] = 1;
        }
        if(v[xy][1][2] >= max(v[xy][1][0], v[xy][1][1])){
            state_v[xy][1] = v[xy][1][2];
            state_d[xy][1] = 2;
        }
    }

    double ans = calc_area(state_v, state_d, 0);
    for(auto &t : events){
        const double time = get<0>(t);
        const ll xy       = get<1>(t);
        const ll init_pos = get<2>(t);
        const ll minmax   = get<3>(t);
        const ll dir      = get<4>(t);
        if(time <= 0){ continue; }

        const double p1 = state_v[xy][minmax] + (state_d[xy][minmax] - 1) * time;
        const double p2 = init_pos + (dir - 1) * time;
        if(minmax == 0 && p2 <= p1){
            state_v[xy][minmax] = init_pos;
            state_d[xy][minmax] = dir;
        }else if(minmax == 1 && p2 >= p1){
            state_v[xy][minmax] = init_pos;
            state_d[xy][minmax] = dir;
        }
        ans = min(ans, calc_area(state_v, state_d, time));
    }
    printf("%.10f\n", ans);
    return 0;
}


Measured memory_bytes: 256