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

inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<long long> VL;
typedef vector<vector<long long>> VVL;
typedef vector<string> VS;
typedef pair<int, int> P;
typedef tuple<int,int,int> tpl;

#define ALL(a)  (a).begin(),(a).end()
#define SORT(c) sort((c).begin(),(c).end())
#define REVERSE(c) reverse((c).begin(),(c).end())
#define LB(a,x) lower_bound((a).begin(), (a).end(), x) - (a).begin()
#define UB(a,x) upper_bound((a).begin(), (a).end(), x) - (a).begin()

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define RFOR(i,a,b) for(int i=(a)-1;i>=(b);--i)
#define RREP(i,n) RFOR(i,n,0)

#define en "\n"

constexpr double EPS = 1e-9;
constexpr double PI  = 3.1415926535897932;
constexpr int INF = 2147483647;
constexpr long long LINF = 1LL<<60;
constexpr long long MOD = 1000000007; // 998244353;

#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

void Main(){
    int N; cin >> N;
    vector<long double> x(N),y(N);
    vector<char> dir(N);
    VI l,r,u,d,lr,ud;
    REP(i,N){
        cin >> x[i] >> y[i] >> dir[i];

        if(dir[i] == 'U'){
            u.push_back(i); ud.push_back(i);
        }
        else if(dir[i] == 'D'){
            d.push_back(i); ud.push_back(i);
        }
        else if(dir[i] == 'L'){
            l.push_back(i); lr.push_back(i);
        }
        else{
            r.push_back(i); lr.push_back(i);
        }
    }

    auto compx = [&](int i, int j){return x[i]<x[j];};
    auto compy = [&](int i, int j){return y[i]<y[j];};
    sort(ALL(l),compx); sort(ALL(r),compx); sort(ALL(ud),compx);
    sort(ALL(u),compy); sort(ALL(d),compy); sort(ALL(lr),compy);

    VI xmin, xmax, ymin, ymax;
    vector<long double> cand_t{0};

    if(l.size()){
        xmin.push_back(l[0]);
        xmax.push_back(l.back());
    }
    if(r.size()){
        REP(i,xmin.size()){
            long double t = (x[xmin[i]] - x[r[0]])/2;
            if(t>=0) cand_t.push_back(t);
            t = (x[xmax[i]] - x[r.back()])/2;
            if(t>=0) cand_t.push_back(t);
        }
        xmin.push_back(r[0]);
        xmax.push_back(r.back());
    }
    if(ud.size()){
        REP(i,xmin.size()){
            if(dir[xmin[i]]=='L' && x[ud[0]] <= x[xmin[i]]) cand_t.push_back(x[xmin[i]]-x[ud[0]]);
            else if(dir[xmin[i]]=='R' && x[xmin[i]] <= x[ud[0]]) cand_t.push_back(x[ud[0]]-x[xmin[i]]);
            if(dir[xmax[i]]=='L' && x[ud.back()] <= x[xmax[i]]) cand_t.push_back(x[xmax[i]]-x[ud.back()]);
            else if(dir[xmax[i]]=='R' && x[xmax[i]] <= x[ud.back()]) cand_t.push_back(x[ud.back()]-x[xmax[i]]);
        }
        xmin.push_back(ud[0]);
        xmax.push_back(ud.back());
    }

    if(d.size()){
        ymin.push_back(d[0]);
        ymax.push_back(d.back());
    }
    if(u.size()){
        REP(i,ymin.size()){
            long double t = (y[ymin[i]] - y[u[0]])/2;
            if(t>=0) cand_t.push_back(t);
            t = (y[ymax[i]] - y[u.back()])/2;
            if(t>=0) cand_t.push_back(t);
        }
        ymin.push_back(u[0]);
        ymax.push_back(u.back());
    }
    if(lr.size()){
        REP(i,ymin.size()){
            if(dir[ymin[i]]=='D' && y[lr[0]] <= y[ymin[i]]) cand_t.push_back(y[ymin[i]]-y[lr[0]]);
            else if(dir[ymin[i]]=='U' && y[ymin[i]] <= y[lr[0]]) cand_t.push_back(y[lr[0]]-y[ymin[i]]);
            if(dir[ymax[i]]=='D' && y[lr.back()] <= y[ymax[i]]) cand_t.push_back(y[ymax[i]]-y[lr.back()]);
            else if(dir[ymax[i]]=='U' && y[ymax[i]] <= y[lr.back()]) cand_t.push_back(y[lr.back()]-y[ymax[i]]);
        }
        ymin.push_back(lr[0]);
        ymax.push_back(lr.back());
    }

    long double ans = 1e18;
    int K = cand_t.size();
    REP(i,K){
        long double t = cand_t[i];
        long double xmn=1e15, xmx=-1e15, ymn=1e15, ymx=-1e15;
        for(int j : xmin){
            if(dir[j]=='L') chmin(xmn, -t+x[j]);
            else if(dir[j]=='R') chmin(xmn, t+x[j]);
            else chmin(xmn, x[j]);
        }
        for(int j : xmax){
            if(dir[j]=='L') chmax(xmx, -t+x[j]);
            else if(dir[j]=='R') chmax(xmx, t+x[j]);
            else chmax(xmx, x[j]);
        }
        for(int j : ymin){
            if(dir[j]=='D') chmin(ymn, -t+y[j]);
            else if(dir[j]=='U') chmin(ymn, t+y[j]);
            else chmin(ymn, y[j]);
        }
        for(int j : ymax){
            if(dir[j]=='D') chmax(ymx, -t+y[j]);
            else if(dir[j]=='U') chmax(ymx, t+y[j]);
            else chmax(ymx, y[j]);
        }

        chmin(ans, (xmx-xmn)*(ymx-ymn));
    }

    cout << ans << en;
    return;
}

int main(void){
    cin.tie(0);ios_base::sync_with_stdio(0);cout<<fixed<<setprecision(15);
    int t=1; //cin>>t;
    REP(_,t){
        Main();
    }
    return 0;
}

Measured memory_bytes: 4604