#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cmath>
#include <tuple>
#define rep(i, n) for(i = 0; i < n; i++)
#define double long double
#define int long long
using namespace std;
typedef pair<double, double> P;

int dy[4] = {1, 0, -1, 0};
int dx[4] = {0, 1, 0, -1};
int n;
double xx[100000], yy[100000]; int dd[100000];
vector<P> ps[4];	//U, R, D, L
vector<int> psId[4];
double lx, rx, ly, ry;

signed main() {
	int i, j;
	
	cin >> n;
	
	lx = 1e+8;
	rx = -1e+8;
	ly = 1e+8;
	ry = -1e+8;
	rep(i, n) {
		double x, y; char d;
		cin >> x >> y >> d;
		xx[i] = x;
		yy[i] = y;
		if (d == 'U') { ps[0].push_back(P(x, y)); dd[i] = 0; }
		if (d == 'R') { ps[1].push_back(P(x, y)); dd[i] = 1; }
		if (d == 'D') { ps[2].push_back(P(x, y)); dd[i] = 2; }
		if (d == 'L') { ps[3].push_back(P(x, y)); dd[i] = 3; }
		psId[dd[i]].push_back(i);
		
		if (d == 'U' || d == 'D') {
			lx = min(lx, x);
			rx = max(rx, x);
		}
		else {
			ly = min(ly, y);
			ry = max(ry, y);
		}
	}
	
	vector<int> vec;
	rep(i, 4) {
		if (i % 2 == 0) {
			int id1 = -1;
			rep(j, ps[i].size()) {
				if (id1 == -1 || ps[i][id1].second > ps[i][j].second) {
					id1 = j;
				}
			}
			int id2 = -1;
			rep(j, ps[i].size()) {
				if (id2 == -1 || ps[i][id2].second < ps[i][j].second) {
					id2 = j;
				}
			}
			if (id1 >= 0) vec.push_back(psId[i][id1]);
			if (id2 >= 0) vec.push_back(psId[i][id2]);
		}
		
		if (i % 2 == 1) {
			int id1 = -1;
			rep(j, ps[i].size()) {
				if (id1 == -1 || ps[i][id1].first > ps[i][j].first) {
					id1 = j;
				}
			}
			int id2 = -1;
			rep(j, ps[i].size()) {
				if (id2 == -1 || ps[i][id2].first < ps[i][j].first) {
					id2 = j;
				}
			}
			if (id1 >= 0) vec.push_back(psId[i][id1]);
			if (id2 >= 0) vec.push_back(psId[i][id2]);
		}
	}
	sort(vec.begin(), vec.end());
	vec.erase(unique(vec.begin(), vec.end()), vec.end());
	
	/*rep(i, vec.size()) {
		cout << "vec[" << i << "] = " << vec[i] << endl;
	}*/
	
	vector<double> ts;
	
	ts.push_back(0);
	rep(i, vec.size()) {
		int a = vec[i];
		for (j = i + 1; j < vec.size(); j++) {
			int b = vec[j];
			ts.push_back(abs(xx[a] - xx[b]) * 0.5);
			ts.push_back(abs(yy[a] - yy[b]) * 0.5);
			ts.push_back(abs(xx[a] - xx[b]));
			ts.push_back(abs(yy[a] - yy[b]));
		}
		ts.push_back(abs(yy[a] - ly));
		ts.push_back(abs(yy[a] - ry));
		ts.push_back(abs(xx[a] - lx));
		ts.push_back(abs(xx[a] - rx));
	}
	sort(ts.begin(), ts.end());
	ts.erase(unique(ts.begin(), ts.end()), ts.end());
	
	//cout << "lx = " << lx << ", rx = " << rx << endl;
	//cout << "ly = " << ly << ", ry = " << ry << endl;
	double ans = 1e+18;
	rep(i, ts.size()) {
		double t = ts[i];
		//cout << "t = " << t << endl;
		double minX = 1e+8;
		double maxX = -1e+8;
		double minY = 1e+8;
		double maxY = -1e+8;
		rep(j, vec.size()) {
			int id = vec[j];
			double nowX = xx[id] + dx[dd[id]] * t;
			double nowY = yy[id] + dy[dd[id]] * t;
			minX = min(minX, nowX);
			maxX = max(maxX, nowX);
			minY = min(minY, nowY);
			maxY = max(maxY, nowY);
		}
		//cout << "minX = " << minX << ", maxX = " << maxX << endl;
		//cout << "minY = " << minY << ", maxY = " << maxY << endl;
		double Lx = min(lx, minX);
		double Rx = max(rx, maxX);
		double Ly = min(ly, minY);
		double Ry = max(ry, maxY);
		if (Lx > Rx) Lx = Rx;
		if (Ly > Ry) Ly = Ry;
		
		double score = (Rx - Lx) * (Ry - Ly);
		//cout << "score = " << score << endl;
		ans = min(ans, score);
	}
	printf("%.14Lf\n", ans);
	return 0;
}

Measured memory_bytes: 8660