#include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
using namespace std;
typedef long long ll;
typedef unsigned int ui;
const ll mod = 1000000007;
const ll INF = (ll)1000000007 * 1000000007;
typedef pair<int, int> P;
#define stop char nyaa;cin>>nyaa;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef long double ld;
typedef complex<ld> Point;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<ld, ld> LP;

int n;
vector<ld> u,d,r,l;
vector<LP> p;
vector<int> v;
vector<ld> c={0};

vector<ld> dx={0,0,1,-1},dy={1,-1,0,0};
ld ymi=INF,yma=-INF,xmi=INF,xma=-INF;


void solve(){
    cin >> n;
    ld x,y;string m;
    rep(i,n){
        cin >> x >> y >> m;
        p.push_back(LP(x,y));
        if (m=="U"){
            u.push_back(y);
            xmi=min(xmi,x);
            xma=max(xma,x);
            v.push_back(0);
        }
        if (m=="D"){
            d.push_back(y);
            xmi=min(xmi,x);
            xma=max(xma,x);
            v.push_back(1);
        }
        if (m=="R"){
            r.push_back(x);
            ymi=min(ymi,y);
            yma=max(yma,y);
            v.push_back(2);
        }
        if (m=="L"){
            l.push_back(x);
            ymi=min(ymi,y);
            yma=max(yma,y);
            v.push_back(3);
        }
    }
    
    if (!u.empty()){
        sort(u.begin(),u.end());
        if (u.back() < yma) c.push_back(yma - u.back());
        if (ymi > u[0]) c.push_back(ymi - u[0]);
    }
    if (!d.empty()){
        sort(d.begin(),d.end());
        if (d.back() > yma) c.push_back(d.back() - yma);
        if (ymi < d[0]) c.push_back(d[0] - ymi);
    }
    if (!r.empty()){
        sort(r.begin(),r.end());
        if (r.back() < xma) c.push_back(xma - r.back());
        if (xmi > r[0]) c.push_back(xmi - r[0]);
    }
    if (!l.empty()){
        sort(l.begin(),l.end());
        if (l.back() > xma) c.push_back(l.back() - xma);
        if (xmi < l[0]) c.push_back(l[0] - xmi);
    }
    if (!u.empty() && !d.empty()) {
		if (d.back() > u.back()) {
			c.push_back((d.back() - u.back()) / 2.0);
		}
		if (d[0] > u[0]) {
			c.push_back((d[0] - u[0]) / 2.0);
		}
	}
    if (!l.empty() && !r.empty()) {
		if (l.back() > r.back()) {
			c.push_back((l.back() - r.back()) / 2.0);
		}
		if (l[0] > r[0]) {
			c.push_back((l[0] - r[0]) / 2.0);
		}
	}
    sort(c.begin(),c.end());
    ld ans=INF,t,nx,ny;
    rep(k,c.size()){
        t=c[k];
        ld ymi=INF,yma=-INF,xmi=INF,xma=-INF;
        rep(i,n){
            nx=p[i].first+dx[v[i]]*t;
            ny=p[i].second+dy[v[i]]*t;
            xmi=min(nx,xmi);
            xma=max(nx,xma);
            ymi=min(ny,ymi);
            yma=max(ny,yma);
        }
        //cout << t << " " << (xma-xmi)*(yma-ymi) << endl;
        ans=min(ans,(xma-xmi)*(yma-ymi));

    }
    cout << ans << endl;
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << fixed << setprecision(10);
    solve();
}

Measured memory_bytes: 8308