//This is getting accepted!
#include<bits/stdc++.h>
#define ll long long
#define oo 1000000009
#define FOR(i,a,b) for(int i = (a); i <= (b); ++i)
#define INA(a,n) for (int i = 1; i <= (n); ++i) cin >> a[i];
#define ITE(x) for(auto it = (x).begin(); it != (x).end(); ++it)
#define isset(x, i) (((x)>>(i))&1)
#define setbit(x, i) ((x)^(1ll<<(i)))
#define clearbit(x, i) ((x)&(~(1ll<<(i))))
#define twoexp(i) (1ll<<(i))
#define MAX(a,b) ((a) > (b) ? (a) : (b))
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#define ABS(a) ((a) >= 0 ? (a) : -(a))
#define FI first
#define SE second
#define son1 (id*2)
#define son2 (id*2+1)

using namespace std;

const int MOD = 1000000007;
const double EPS = 1e-8;
const double PI = 2 * acos(0);
const int MAXN = 1e6 + 6;

int n;
double minxL, maxxL;
double minxR, maxxR;
double minyU, maxyU;
double minyD, maxyD;
double minyH, maxyH;
double minxV, maxxV;

void input() {
	int u, v, x, y, qtype;
	char w;
	
	minxL = minxR = minyU = minyD = minyH = minxV = oo;
	maxxL = maxxR = maxyU = maxyD = maxyH = maxxV = -oo;
		
	cin >> n;
	FOR(i, 1, n) {
		cin >> x >> y >> w;
		if (w == 'U') {
			maxyU = MAX(maxyU, y);
			minyU = MIN(minyU, y);
			minxV = MIN(minxV, x);
			maxxV = MAX(maxxV, x);
		}
		if (w == 'D') {
			maxyD = MAX(maxyD, y);
			minyD = MIN(minyD, y);
			minxV = MIN(minxV, x);
			maxxV = MAX(maxxV, x);
		}
		if (w == 'L') {
			maxxL = MAX(maxxL, x);
			minxL = MIN(minxL, x);
			minyH = MIN(minyH, y);
			maxyH = MAX(maxyH, y);
		}
		if (w == 'R') {
			maxxR = MAX(maxxR, x);
			minxR = MIN(minxR, x);
			minyH = MIN(minyH, y);
			maxyH = MAX(maxyH, y);
		}
	}
	
}


void preprocess() {
	
	
	
}

double area(double t) {
	double minx = min(min(minxR+t, minxL-t), minxV);
	double maxx = max(max(maxxR+t, maxxL-t), maxxV);
	double miny = min(min(minyU+t, minyD-t), minyH);
	double maxy = max(max(maxyU+t, maxyD-t), maxyH);
	return (maxx-minx) * (maxy-miny);
}

void process(int itest) {
	int u, v, w, x, y, qtype;
	
	double res = area(0);
	
	if (minxR < minxV) res = min(res, area(minxV-minxR));
	if (minxR < maxxV) res = min(res, area(maxxV-minxR));
	if (minxR < minxL) res = min(res, area((minxL-minxR)/2));
	if (minxR < maxxL) res = min(res, area((maxxL-minxR)/2));
	
	if (maxxR < minxV) res = min(res, area(minxV-maxxR));
	if (maxxR < maxxV) res = min(res, area(maxxV-maxxR));
	if (maxxR < minxL) res = min(res, area((minxL-maxxR)/2));
	if (maxxR < maxxL) res = min(res, area((maxxL-maxxR)/2));
	
	if (minxV < minxL) res = min(res, area((minxL-minxV)/2));
	if (minxV < maxxL) res = min(res, area((maxxL-minxV)/2));
	if (maxxV < minxL) res = min(res, area((minxL-maxxV)/2));
	if (maxxV < maxxL) res = min(res, area((maxxL-maxxV)/2));
	
	
	if (minyU < minyH) res = min(res, area(minyH-minyU));
	if (minyU < maxyH) res = min(res, area(maxyH-minyU));
	if (minyU < minyD) res = min(res, area((minyD-minyU)/2));
	if (minyU < maxyD) res = min(res, area((maxyD-minyU)/2));
	
	if (maxyU < minyH) res = min(res, area(minyH-maxyU));
	if (maxyU < maxyH) res = min(res, area(maxyH-maxyU));
	if (maxyU < minyD) res = min(res, area((minyD-maxyU)/2));
	if (maxyU < maxyD) res = min(res, area((maxyD-maxyU)/2));
	
	if (minyH < minyD) res = min(res, area(minyD-minyH));
	if (minyH < maxyD) res = min(res, area(maxyD-minyH));
	if (maxyH < minyD) res = min(res, area(minyD-maxyH));
	if (maxyH < maxyD) res = min(res, area(maxyD-maxyH));
	
	cout << fixed << setprecision(8) << res << endl;
}

void oneTest() {
	
	input();
	preprocess();
	process(0);
	
}

void multiTest() {
	
	int t;
	cin >> t;
	
	for (int it = 1; it <= t; ++it) {
		input();
		preprocess();
		process(it);
	}
}

int main(){
    #ifndef ONLINE_JUDGE
//    freopen("../out.txt", "w", stdout);
    #endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

	oneTest();
//	multiTest();

    return 0;

}


Measured memory_bytes: 256