#include <bits/stdc++.h>
using namespace std;
#define inf 1e18

double evalx(double t, double x, double y, char d){
	if(d == 'R') return x + t;
	else if(d == 'L') return x - t;
	else return x;
}

double evaly(double t, double x, double y, char d){
	if(d == 'U') return y + t;
	else if(d == 'D') return y - t;
	else return y;
}

double eval(double t, int N, vector<double> &x, vector<double> &y, vector<char> &d){
	int i;
	double xmax = -inf, xmin = inf, ymax = -inf, ymin = inf;
	for(i = 0; i < N; i++){
		xmax = max(xmax, evalx(t, x[i], y[i], d[i]));
		xmin = min(xmin, evalx(t, x[i], y[i], d[i]));
		ymax = max(ymax, evaly(t, x[i], y[i], d[i]));
		ymin = min(ymin, evaly(t, x[i], y[i], d[i]));
	}
	double ans = (xmax - xmin) * (ymax - ymin);
//	printf("(xmax, xmin, ymax, ymin)[%lf] = (%lf, %lf, %lf, %lf)\n", t, xmax, xmin, ymax, ymin);
	return ans;
}

int parallel(pair<double, double> l1, pair<double, double> l2){
	return l1.first == l2.first;
}

double insec(pair<double, double> l1, pair<double, double> l2){
	return (l2.second - l1.second) / (l1.first - l2.first);
}

int quadra(pair<double, double> l1, pair<double, double> l2){
	return l1.first * l2.first != 0;
}

double top(pair<double, double> l1, pair<double, double> l2){
	return (l1.first * l2.second + l1.second * l2.first) / (-2 * l1.first * l2.first);
}

signed main(){
	int N, i, j;
	scanf("%lld", &N);
	vector<double> x(N), y(N);
	vector<char> d(N);
	for(i = 0; i < N; i++){
		scanf("%lf%lf", &x[i], &y[i]);
		string sub;
		cin >> sub;
		d[i] = sub[0];
	}
//	printf("test1\n");
	vector<double> candidate(1, 0);
	vector<double> Rx(0), Ry(0), Lx(0), Ly(0), Ux(0), Uy(0), Dx(0), Dy(0);
	for(i = 0; i < N; i++){
//		printf("i = %lld\n", i);
//		printf("d = %c\n", d[i]);
		if(d[i] == 'R'){
			Rx.push_back(x[i]);
			Ry.push_back(y[i]);
		}
		else if(d[i] == 'L'){
			Lx.push_back(x[i]);
			Ly.push_back(y[i]);
		}
		else if(d[i] == 'U'){
			Ux.push_back(x[i]);
			Uy.push_back(y[i]);
		}
		else{
//			printf("test1.7\n");
			Dx.push_back(x[i]);
			Dy.push_back(y[i]);
		}
	}
//	printf("test2\n");
	vector<pair<double, double>> lxmax(0), lxmin(0), lymax(0), lymin(0);
	if(Rx.size() > 0){
		lxmax.push_back(pair<double, double>(1, -inf));
		for(i = 0; i < Rx.size(); i++){
			lxmax[lxmax.size() - 1].second = max(lxmax[lxmax.size() - 1].second, Rx[i]);
		}
	}
	if(Lx.size() > 0){
		lxmax.push_back(pair<double, double>(-1, -inf));
		for(i = 0; i < Lx.size(); i++){
			lxmax[lxmax.size() - 1].second = max(lxmax[lxmax.size() - 1].second, Lx[i]);
		}
	}
	if(Ux.size() + Dx.size() > 0){
		lxmax.push_back(pair<double, double>(0, -inf));
		for(i = 0; i < Ux.size(); i++){
			lxmax[lxmax.size() - 1].second = max(lxmax[lxmax.size() - 1].second, Ux[i]);
		}
		for(i = 0; i < Dx.size(); i++){
			lxmax[lxmax.size() - 1].second = max(lxmax[lxmax.size() - 1].second, Dx[i]);
		}
	}

	if(Rx.size() > 0){
		lxmin.push_back(pair<double, double>(1, inf));
		for(i = 0; i < Rx.size(); i++){
			lxmin[lxmin.size() - 1].second = min(lxmin[lxmin.size() - 1].second, Rx[i]);
		}
	}
	if(Lx.size() > 0){
		lxmin.push_back(pair<double, double>(-1, inf));
		for(i = 0; i < Lx.size(); i++){
			lxmin[lxmin.size() - 1].second = min(lxmin[lxmin.size() - 1].second, Lx[i]);
		}
	}
	if(Ux.size() + Dx.size() > 0){
		lxmin.push_back(pair<double, double>(0, inf));
		for(i = 0; i < Ux.size(); i++){
			lxmin[lxmin.size() - 1].second = min(lxmin[lxmin.size() - 1].second, Ux[i]);
		}
		for(i = 0; i < Dx.size(); i++){
			lxmin[lxmin.size() - 1].second = min(lxmin[lxmin.size() - 1].second, Dx[i]);
		}
	}

	if(Ux.size() > 0){
		lymax.push_back(pair<double, double>(1, -inf));
		for(i = 0; i < Ux.size(); i++){
			lymax[lymax.size() - 1].second = max(lymax[lymax.size() - 1].second, Uy[i]);
		}
	}
	if(Dx.size() > 0){
		lymax.push_back(pair<double, double>(-1, -inf));
		for(i = 0; i < Dx.size(); i++){
			lymax[lymax.size() - 1].second = max(lymax[lymax.size() - 1].second, Dy[i]);
		}
	}
	if(Rx.size() + Lx.size() > 0){
		lymax.push_back(pair<double, double>(0, -inf));
		for(i = 0; i < Rx.size(); i++){
			lymax[lymax.size() - 1].second = max(lymax[lymax.size() - 1].second, Ry[i]);
		}
		for(i = 0; i < Lx.size(); i++){
			lymax[lymax.size() - 1].second = max(lymax[lymax.size() - 1].second, Ly[i]);
		}
	}

	if(Ux.size() > 0){
		lymin.push_back(pair<double, double>(1, inf));
		for(i = 0; i < Ux.size(); i++){
			lymin[lymin.size() - 1].second = min(lymin[lymin.size() - 1].second, Uy[i]);
		}
	}
	if(Dx.size() > 0){
		lymin.push_back(pair<double, double>(-1, inf));
		for(i = 0; i < Dx.size(); i++){
			lymin[lymin.size() - 1].second = min(lymin[lymin.size() - 1].second, Dy[i]);
		}
	}
	if(Rx.size() + Lx.size() > 0){
		lymin.push_back(pair<double, double>(0, inf));
		for(i = 0; i < Rx.size(); i++){
			lymin[lymin.size() - 1].second = min(lymin[lymin.size() - 1].second, Ry[i]);
		}
		for(i = 0; i < Lx.size(); i++){
			lymin[lymin.size() - 1].second = min(lymin[lymin.size() - 1].second, Ly[i]);
		}
	}
//	printf("test3\n");

	vector<pair<double, double>> lx(0), ly(0);
	for(i = 0; i < lxmax.size(); i++){
		for(j = 0; j < lxmin.size(); j++){
			lx.push_back(pair<double, double>(lxmax[i].first - lxmin[j].first, lxmax[i].second - lxmin[j].second));
		}
	}

	for(i = 0; i < lymax.size(); i++){
		for(j = 0; j < lymin.size(); j++){
			ly.push_back(pair<double, double>(lymax[i].first - lymin[j].first, lymax[i].second - lymin[j].second));
		}
	}

	for(i = 0; i < lx.size(); i++){
		for(j = 0; j < i; j++){
			if(parallel(lx[i], lx[j]) == 0){
				candidate.push_back(insec(lx[i], lx[j]));
			}
		}
	}

	for(i = 0; i < ly.size(); i++){
		for(j = 0; j < i; j++){
			if(parallel(ly[i], ly[j]) == 0){
				candidate.push_back(insec(ly[i], ly[j]));
			}
		}
	}

	for(i = 0; i < lx.size(); i++){
		for(j = 0; j < ly.size(); j++){
			if(quadra(lx[i], ly[j]) == 1){
				candidate.push_back(top(lx[i], ly[j]));
			}
		}
	}

/*	printf("lx:\n");
	for(i = 0; i < lx.size(); i++){
		printf("(%lf, %lf)\n", lx[i].first, lx[i].second);
	}

	printf("ly:\n");
	for(i = 0; i < ly.size(); i++){
		printf("(%lf, %lf)\n", ly[i].first, ly[i].second);
	}

	for(i = 0; i < candidate.size(); i++){
		printf("candidate[%lld] = %lf\n", i, candidate[i]);
	}
*/
	double ans = inf;
	for(i = 0; i < candidate.size(); i++){
		if(candidate[i] >= 0){
			ans = min(ans, eval(candidate[i], N, x, y, d));
		}
	}
	printf("%.10lf\n", ans);
/*	for(double t = 0; t <= 10; t += 0.25){
		printf("val(%lf) = %lf\n", t, eval(t, N, x, y, d));
	}
*/	return 0;
}

Measured memory_bytes: 3952