#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define zero_pad(num) setfill('0') << std::right << setw(num)
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<ll, ll>;

int main() {
    int n;
    cin >> n;
    vector<P> u, d, r, l;
    rep(i, n){
        ll x, y;
        char c;
        cin >> x >> y >> c;
        if(c == 'U')u.push_back(make_pair(x, y));
        else if(c == 'D')d.push_back(make_pair(x, y));
        else if(c == 'R')r.push_back(make_pair(x, y));
        else if(c == 'L')l.push_back(make_pair(x, y));
    }
    vector<P> ymax(3), ymin(3), xmax(3), xmin(3);
    ll INF = 1001001001;
    P mx = make_pair(0, -INF);
    P mn = make_pair(0, INF);
    for(P p : r){
        if(p.second > mx.second)mx.second = p.second;
        if(p.second < mn.second)mn.second = p.second;
    }
    for(P p : l){
        if(p.second > mx.second)mx.second = p.second;
        if(p.second < mn.second)mn.second = p.second;
    }
    ymax[0] = mx;
    ymin[0] = mn;

    mx = make_pair(0, -INF);
    mn = make_pair(0, INF);
    for(P p : u){
        if(p.first > mx.second)mx.second = p.first;
        if(p.first < mn.second)mn.second = p.first;
    }
    for(P p : d){
        if(p.first > mx.second)mx.second = p.first;
        if(p.first < mn.second)mn.second = p.first;
    }
    xmax[0] = mx;
    xmin[0] = mn;

    mx = make_pair(1, -INF);
    mn = make_pair(1, INF);
    for(P p : u){
        if(p.second > mx.second)mx.second = p.second;
        if(p.second < mn.second)mn.second = p.second;
    }
    ymax[1] = mx;
    ymin[1] = mn;

    mx = make_pair(-1, -INF);
    mn = make_pair(-1, INF);
    for(P p : d){
        if(p.second > mx.second)mx.second = p.second;
        if(p.second < mn.second)mn.second = p.second;
    }
    ymax[2] = mx;
    ymin[2] = mn;

    mx = make_pair(1, -INF);
    mn = make_pair(1, INF);
    for(P p : r){
        if(p.first > mx.second)mx.second = p.first;
        if(p.first < mn.second)mn.second = p.first;
    }
    xmax[1] = mx;
    xmin[1] = mn;

    mx = make_pair(-1, -INF);
    mn = make_pair(-1, INF);
    for(P p : l){
        if(p.first > mx.second)mx.second = p.first;
        if(p.first < mn.second)mn.second = p.first;
    }
    xmax[2] = mx;
    xmin[2] = mn;

    vector<ld> t;
    t.push_back(0);
    t.push_back(ymax[2].second - ymax[0].second);
    t.push_back(ymax[0].second - ymax[1].second);
    t.push_back((ld)(ymax[2].second - ymax[1].second) / 2);
    t.push_back(ymin[2].second - ymin[0].second);
    t.push_back(ymin[0].second - ymin[1].second);
    t.push_back((ld)(ymin[2].second - ymin[1].second) / 2);
    t.push_back(xmax[2].second - xmax[0].second);
    t.push_back(xmax[0].second - xmax[1].second);
    t.push_back((ld)(xmax[2].second - xmax[1].second) / 2);
    t.push_back(xmin[2].second - xmin[0].second);
    t.push_back(xmin[0].second - xmin[1].second);
    t.push_back((ld)(xmin[2].second - xmin[1].second) / 2);

    ld ans = INF * INF;
    for(ld tt : t){
        if(tt < 0)continue;
        ld y_max = -INF;
        for(P p : ymax)y_max = max(y_max, tt * p.first + p.second);
        ld y_min = INF;
        for(P p : ymin)y_min = min(y_min, tt * p.first + p.second);
        ld x_max = -INF;
        for(P p : xmax)x_max = max(x_max, tt * p.first + p.second);
        ld x_min = INF;
        for(P p : xmin)x_min = min(x_min, tt * p.first + p.second);
        ans = min(ans, (y_max-y_min) * (x_max-x_min));
    }
    cout << setprecision(14);
    cout << ans << endl;
}

Measured memory_bytes: 2284