#include <bits/stdc++.h>
using namespace std;
#define all(V) V.begin(),V.end()
#define ll long long
#define MOD 998244353
const double SMALL = pow(10, -12);

vector<pair<double, double>> P[4];
double M[4][4], L[4][4];

void chmin(double& x, double y) {
	x = min(x, y);
}

void chmax(double&x, double y) {
	x = max(x, y);
}

double val(double T) {
	double xmax = LLONG_MIN, xmin = LLONG_MAX, ymax = LLONG_MIN, ymin = LLONG_MAX;

	chmax(xmax, max({ 
		M[0][0] - T,
		M[0][1] - T,
		M[1][0] + T,
		M[1][1] + T,
		M[2][0],
		M[2][1],
		M[3][0],
		M[3][1] 
		})
	);

	chmin(xmin, min({
		L[0][0] - T,
		L[0][1] - T,
		L[1][0] + T,
		L[1][1] + T,
		L[2][0],
		L[2][1],
		L[3][0],
		L[3][1]
		})
	);

	chmax(ymax, max({
		M[2][2] + T,
		M[2][3] + T,
		M[3][2] - T,
		M[3][3] - T,
		M[0][2],
		M[0][3],
		M[1][2],
		M[1][3]
		})
	);

	chmin(ymin, min({
		L[2][2] + T,
		L[2][3] + T,
		L[3][2] - T,
		L[3][3] - T,
		L[0][2],
		L[0][3],
		L[1][2],
		L[1][3]
		})
	);
	//cout << T << " " << xmax << " " << xmin << " " << ymax << " " << ymin << endl;
	return (xmax - xmin) * (ymax - ymin);
}

double tri(double x, double y, int t) {
	if (t > 120)return val(x);
	double T31 = (x * 2 + y) / 3;
	double T32 = (x + y * 2) / 3;
	double t31 = val(T31);
	double t32 = val(T32);

	if (t31 < t32) {
		return tri(x, T32, t + 1);
	}
	else {
		return tri(T31, y, t + 1);
	}
}

int main() {
	int N, x, y;
	char d;
	cin >> N;
	for (int i = 0;i < 4;i++) {
		for (int j = 0;j < 4;j++) {
			M[i][j] = LLONG_MIN;
			L[i][j] = LLONG_MAX;
		}
	}
	for (int i = 0;i < N;i++) {
		cin >> x >> y >> d;
		if (d == 'L')
			P[0].push_back({ x,y });
		else if (d == 'R')
			P[1].push_back({ x,y });
		else if (d == 'U')
			P[2].push_back({ x,y });
		else 
			P[3].push_back({ x,y });
	}
	for (int i = 0;i < 4;i++) {
		for (auto j : P[i]) {
			chmin(L[i][0], j.first);
			chmax(M[i][1], j.first);
			chmax(M[i][2], j.second);
			chmin(L[i][3], j.second);
		}
	}

	//上下に動くものの中でx最大、x最小
	vector<double> CT;
	double udxx = LLONG_MIN, udxn = LLONG_MAX;
	for (auto& i : P[3]) {
		chmax(udxx, i.first);
		chmin(udxn, i.first);
	}
	for (auto& i : P[2]) {
		chmax(udxx, i.first);
		chmin(udxn, i.first);
	}

	//左に動くものの中でx最大、最小
	sort(all(P[0]));
	int ps1 = P[0].size();

	if (ps1 != 0) {
		CT.push_back(udxx - P[0][ps1 - 1].first);
		CT.push_back(udxn - P[0][ps1 - 1].first);
		CT.push_back(udxx - P[0][0].first);
		CT.push_back(udxn - P[0][0].first);
	}
	sort(all(P[1]));
	int ps2 = P[1].size();
	if (ps2 != 0) {
		CT.push_back(udxx - P[1][ps2 - 1].first);
		CT.push_back(udxn - P[1][ps2 - 1].first);
		CT.push_back(udxx - P[1][0].first);
		CT.push_back(udxn - P[1][0].first);
	}
	if (ps1 > 0 && ps2 > 0) {
		CT.push_back((P[0][ps1 - 1].first - P[1][ps2 - 1].first) / 2);
		CT.push_back((P[0][ps1 - 1].first - P[1][0].first) / 2);
		CT.push_back((P[0][0].first - P[1][ps2 - 1].first) / 2);
		CT.push_back((P[0][0].first - P[1][0].first) / 2);
	}
	
	double lryx = LLONG_MIN, lryn = LLONG_MAX;
	for (auto& i : P[0]) {
		chmax(lryx, i.second);
		chmax(lryn, i.second);
	}
	for (auto& i : P[1]) {
		chmax(lryx, i.second);
		chmax(lryn, i.second);
	}
	sort(all(P[2]));
	int ps_2 = P[2].size();
	sort(all(P[3]));
	int ps_3 = P[3].size();
	if (ps_2 > 0) {
		CT.push_back(lryx - P[2][ps_2 - 1].second);
		CT.push_back(lryx - P[2][0].second);
		CT.push_back(lryn - P[2][ps_2 - 1].second);
		CT.push_back(lryn - P[2][0].second);
	}
	if (ps_3 > 0) {
		CT.push_back(lryx - P[3][ps_3 - 1].second);
		CT.push_back(lryx - P[3][0].second);
		CT.push_back(lryn - P[3][ps_3 - 1].second);
		CT.push_back(lryn - P[3][0].second);
	}
	if (ps_2 > 0 && ps_3 > 0) {
		CT.push_back((P[2][ps_2 - 1].second - P[3][ps_3 - 1].second));
		CT.push_back((P[2][0].second - P[3][ps_3 - 1].second));
		CT.push_back((P[2][ps_2 - 1].second - P[3][0].second));
		CT.push_back((P[2][0].second - P[3][0].second));
	}

	CT.push_back(0.0);
	CT.push_back(0.0);

	for (auto& i : CT) {
		i = abs(i);
		if (i > LLONG_MAX / 3)i = 0;
	}
	sort(all(CT));

	//ここまで来れば、3分探索やるだけ

	int cts = CT.size();
	double ans = LLONG_MAX;
	for (int i = 1;i < cts;i++) {
		//cout << CT[i - 1] << " " << CT[i] << endl;
		chmin(ans, tri(CT[i - 1], CT[i], 1));
	}
	printf("%.11f\n", ans);
}

Measured memory_bytes: 2192