#include <bits/stdc++.h>
using namespace std;

const int MAXN = 100005;

int N, x[MAXN], y[MAXN];
char d[MAXN];

double inter(vector < pair <int, int> > &v, int a, int b){
    return 1.0 * (v[b].second - v[a].second) / (v[a].first - v[b].first);
}
vector < pair <int, int> > upperhull(vector < pair <int, int> > v){
    sort(v.begin(), v.end());

    vector < pair <int, int> > r;
    for(int i = 0; i < v.size(); i++){
        if(r.empty())r.push_back(v[i]);
        else{
            while(true){
                if(r.back().first == v[i].first){
                    if(r.back().second < v[i].second){
                        r.pop_back();
                    }else break;
                }else{
                    if(r.size() < 2){
                        r.push_back(v[i]);
                        break;
                    }else{
                        if(r[0].second - r[1].second < r[1].second - v[i].second){
                            r.push_back(v[i]);
                            break;
                        }else{
                            r.pop_back();
                        }
                    }
                }
            }
        }
    }
    return r;
}

int main(){
    scanf("%d", &N);

    vector < pair <int, int> > v_xmax, v_xmin, v_ymax, v_ymin;
    for(int i = 0; i < N; i++){
        scanf("%d %d %c", &x[i], &y[i], &d[i]);

        if(d[i] == 'R'){
            v_xmax.push_back(make_pair(1, x[i]));
            v_xmin.push_back(make_pair(-1, -x[i]));

            v_ymax.push_back(make_pair(0, y[i]));
            v_ymin.push_back(make_pair(0, -y[i]));
        }
        if(d[i] == 'L'){
            v_xmax.push_back(make_pair(-1, x[i]));
            v_xmin.push_back(make_pair(1, -x[i]));

            v_ymax.push_back(make_pair(0, y[i]));
            v_ymin.push_back(make_pair(0, -y[i]));
        }
        if(d[i] == 'U'){
            v_xmax.push_back(make_pair(0, x[i]));
            v_xmin.push_back(make_pair(0, -x[i]));

            v_ymax.push_back(make_pair(1, y[i]));
            v_ymin.push_back(make_pair(-1, -y[i]));
        }
        if(d[i] == 'D'){
            v_xmax.push_back(make_pair(0, x[i]));
            v_xmin.push_back(make_pair(0, -x[i]));

            v_ymax.push_back(make_pair(-1, y[i]));
            v_ymin.push_back(make_pair(1, -y[i]));
        }
    }

    vector < pair <int, int> > xmax = upperhull(v_xmax);
    vector < pair <int, int> > xmin = upperhull(v_xmin);
    vector < pair <int, int> > ymax = upperhull(v_ymax);
    vector < pair <int, int> > ymin = upperhull(v_ymin);

    double t = 0;
    int a = 0, b = 0, c = 0, d = 0;

    double res = 1LL << 60;
    while(t < (1LL << 40)){
        while(a + 1 < xmax.size()){
            if(inter(xmax, a, a + 1) <= t)a++;
            else break;
        }
        while(b + 1 < xmin.size()){
            if(inter(xmin, b, b + 1) <= t)b++;
            else break;
        }
        while(c + 1 < ymax.size()){
            if(inter(ymax, c, c + 1) <= t)c++;
            else break;
        }
        while(d + 1 < ymin.size()){
            if(inter(ymin, d, d + 1) <= t)d++;
            else break;
        }

        double nt = 1LL << 60;
        if(a + 1 < xmax.size())nt = min(nt, inter(xmax, a, a + 1));
        if(b + 1 < xmin.size())nt = min(nt, inter(xmin, b, b + 1));
        if(c + 1 < ymax.size())nt = min(nt, inter(ymax, c, c + 1));
        if(d + 1 < ymin.size())nt = min(nt, inter(ymin, d, d + 1));

        int dx = xmax[a].first + xmin[b].first;
        int dy = ymax[c].first + ymin[d].first;

        double ax = xmax[a].second + xmin[b].second;
        double ay = ymax[c].second + ymin[d].second;

        double ot = (ax * dy + ay * dx) / 2 * dx * dy;
        //if(ot >= t && ot <= nt)res = min(res, (ax + dx * ot) * (ay + dy * ot));
        res = min(res, (ax + dx * t) * (ay + dy * t));
        res = min(res, (ax + dx * nt) * (ay + dy * nt));

        t = nt;
    }
    printf("%.12f\n", res);
}


Measured memory_bytes: 5204