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

Int n;
typedef pair<Int, Int> P;
vector<P> x, y;
constexpr double EPS = 1e-14;

double func(double t){
	double xmi = 1e10, ymi = 1e10, xma = -1e10, yma = -1e10;
	for(Int i=0; i<n; ++i){
		xmi = min(xmi, x[i].first+t*x[i].second);
		xma = max(xma, x[i].first+t*x[i].second);
		ymi = min(ymi, y[i].first+t*y[i].second);
		yma = max(yma, y[i].first+t*y[i].second);
	}
	return (xma-xmi)*(yma-ymi);
}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	cin >> n;
	for(Int i=0; i<n; ++i){
		int tx, ty;
		char c;
		cin >> tx >> ty >> c;
		if(c == 'R' || c == 'L'){
			y.push_back(P(ty, 0));
			x.push_back(P(tx, c=='R'?1:-1));
		}else{
			x.push_back(P(tx, 0));
			y.push_back(P(ty, c=='U'?1:-1));
		}
	}
	double tl = 0.0, tr = 1e10;
	for(int i=0; i<150; ++i){
		double t1 = (2 * tl + tr) / 3;
		double t2 = (tl + 2 * tr) / 3;
		double f = func(t1), g = func(t2);
		if(f < g){
			tr = t2;
		}else{
			tl = t1;
		}
	}
	cout << fixed << setprecision(14) << func(tl) << "\n";
}