#include <bits/stdc++.h>
typedef long long LL;
using namespace std;

int n;
vector<pair<int,int>> x, y;

double find_size(double mid)  {
	double mn = 2e18, mx = -2e18;
	for (int i = 0; i < n; ++i) {
		mn = min(mn, x[i].first + x[i].second * mid);
		mx = max(mx, x[i].first + x[i].second * mid);
	}
	double sz = (mx - mn);
	mn = 2e18, mx = -2e18;
	for (int i = 0; i < n; ++i) {
		mn = min(mn, y[i].first + y[i].second * mid);
		mx = max(mx, y[i].first + y[i].second * mid);
	}
	sz *= (mx - mn);
	return sz;
}

int main(int argc, char **argv) {
	cin >> n;
	x.resize(n);
	y.resize(n);
	for (int i = 0; i < n; ++i) {
		char d;
		int a, b;
		cin >> a >> b >> d;
		switch (d) {
			case 'L':
				x[i] = {a, -1};
				y[i] = {b, 0};
				break;
			case 'R':
				x[i] = {a, 1};
				y[i] = {b, 0};
				break;
			case 'D':
				x[i] = {a, 0};
				y[i] = {b, -1};
				break;
			case 'U':
				x[i] = {a, 0};
				y[i] = {b, 1};
				break;
		}
	}

	double lo = 0., hi = 1e12;
	for (int i = 0; i < 500; ++i) {
		double t1 = lo + (hi - lo) / 3.;
		double t2 = lo + (hi - lo) / 3. * 2;
		if (find_size(t1) < find_size(t2))
			hi = t2;
		else
			lo = t1;
	}

	cout << fixed;
	cout.precision(9);
	cout << find_size(lo) << '\n';

	return 0;
}

