#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
using P   = pair<ll, ll>;
using mat = vector<vector<ll>>;
typedef string::const_iterator State;
class ParseError {};

void IOS() { ios::sync_with_stdio(false), cin.tie(0); }

const ll INF = 1e16;
const ll MOD = 1e9 + 7;
const ld EPS = 1e-12;

template <typename T>
void dump(T x) { cout << x << endl; }
void dumpf(ld x, int t) { cout << setprecision(t) << fixed << x << endl; }
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
	fill((T *)array, (T *)(array + N), val);
}
inline ll mod(ll a, ll b) {
	if (a > 0) return a % b;
	if (a % b == 0) return 0;
	ll x = -a / b + 1;
	a += x * b;
	return a % b;
}
ll powm(ll a, ll b, ll c) {
	if (b == 0)
		return 1;
	else if (b % 2 == 0) {
		ll d = powm(a, b / 2, c);
		return (d * d) % c;
	} else
		return (a * powm(a, b - 1, c)) % c;
}
ll gcd(ll a, ll b) {
	if (b == 0) return a;
	return gcd(b, a % b);
}
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
//ll dx[4] = {1, 0, -1, 0};
//ll dy[4] = {0, 1, 0, -1};

double mx(vector<double> a[3]) { //最小値
	double ans = INF;
	for (int i = 0; i < 3; i++) {
		if (a[i].size()) {
			ans = min(ans, a[i][0]);
		}
	}
	return ans;
}

double MX(vector<double> a[3]) {
	double ans = -INF;
	for (int i = 0; i < 3; i++) {
		if (a[i].size()) {
			ans = max(ans, a[i][a[i].size() - 1]);
		}
	}
	return ans;
}

int main() {
	IOS();
	ll n;
	cin >> n;
	vector<double> X[3], Y[3]; //0:正1:負2:停止
	vector<double> time;
	for (int i = 0; i < n; i++) {
		ll x, y;
		char d;
		cin >> x >> y >> d;
		if (d == 'R') {
			X[0].push_back(x);
			Y[2].push_back(y);
		}
		if (d == 'L') {
			X[1].push_back(x);
			Y[2].push_back(y);
		}
		if (d == 'U') {
			X[2].push_back(x);
			Y[0].push_back(y);
		}
		if (d == 'D') {
			X[2].push_back(x);
			Y[1].push_back(y);
		}
	}
	for (int i = 0; i < 3; i++) {
		sort(X[i].begin(), X[i].end());
		sort(Y[i].begin(), Y[i].end());
	}
	time.push_back(0);
	ll x01 = X[0].size() - 1, x11 = X[1].size() - 1, x21 = X[2].size() - 1;
	ll y01 = Y[0].size() - 1, y11 = Y[1].size() - 1, y21 = Y[2].size() - 1;
	if (X[0].size() != 0 && X[1].size() != 0) {
		double t0 = max((X[1][0] - X[0][x01]) / 2.0, 0.0);
		double t1 = max((X[1][x11] - X[0][0]) / 2.0, 0.0);
		double t2 = max((X[1][x11] - X[0][x01]) / 2.0, 0.0);
		double t3 = max((X[1][0] - X[0][0]) / 2.0, 0.0);
		time.push_back(t0);
		time.push_back(t1);
		time.push_back(t2);
		time.push_back(t3);
	}
	if (X[0].size() != 0 && X[2].size() != 0) {
		double t0 = max((X[2][0] - X[0][x01]), 0.0);
		double t1 = max((X[2][x21] - X[0][0]), 0.0);
		double t2 = max((X[2][0] - X[0][0]), 0.0);
		double t3 = max((X[2][x21] - X[0][x01]), 0.0);
		time.push_back(t0);
		time.push_back(t1);
		time.push_back(t2);
		time.push_back(t3);
	}
	if (X[1].size() != 0 && X[2].size() != 0) {
		double t0 = max((X[1][0] - X[2][x21]), 0.0);
		double t1 = max((X[1][x11] - X[2][0]), 0.0);
		double t2 = max((X[1][0] - X[2][0]), 0.0);
		double t3 = max((X[1][x11] - X[2][x21]), 0.0);
		time.push_back(t0);
		time.push_back(t1);
		time.push_back(t2);
		time.push_back(t3);
	}

	if (Y[0].size() != 0 && Y[1].size() != 0) {
		double t0 = max((Y[1][0] - Y[0][y01]) / 2.0, 0.0);
		double t1 = max((Y[1][y11] - Y[0][0]) / 2.0, 0.0);
		double t2 = max((Y[1][0] - Y[0][0]) / 2.0, 0.0);
		double t3 = max((Y[1][y11] - Y[0][y01]) / 2.0, 0.0);
		time.push_back(t0);
		time.push_back(t1);
		time.push_back(t2);
		time.push_back(t3);
	}
	if (Y[0].size() != 0 && Y[2].size() != 0) {
		double t0 = max((Y[2][0] - Y[0][y01]), 0.0);
		double t1 = max((Y[2][y21] - Y[0][0]), 0.0);
		double t2 = max((Y[2][0] - Y[0][0]), 0.0);
		double t3 = max((Y[2][y21] - Y[0][y01]), 0.0);
		time.push_back(t0);
		time.push_back(t1);
		time.push_back(t2);
		time.push_back(t3);
	}
	if (Y[1].size() * Y[2].size()) {
		double t0 = max((Y[1][0] - Y[2][y21]), 0.0);
		double t1 = max((Y[1][y11] - Y[2][0]), 0.0);
		double t2 = max((Y[1][0] - Y[2][0]), 0.0);
		double t3 = max((Y[1][y11] - Y[2][y21]), 0.0);
		time.push_back(t0);
		time.push_back(t1);
		time.push_back(t2);
		time.push_back(t3);
	}

	sort(time.begin(), time.end());
	time.erase(unique(time.begin(), time.end()), time.end());
	vector<double> dif;
	double ans = (MX(X) - mx(X)) * (MX(Y) - mx(Y));
	for (int i = 1; i < time.size(); i++) {
		dif.push_back(time[i] - time[i - 1]);
	}
	for (int unko = 0; unko < dif.size(); unko++) {
		for (int i = 0; i < 2; i++) {
			if (i) dif[unko] *= -1;
			for (int j = 0; j < X[i].size(); j++) {
				X[i][j] += dif[unko];
			}
			for (int j = 0; j < Y[i].size(); j++) {
				Y[i][j] += dif[unko];
			}
		}
		double tmp = (MX(X) - mx(X)) * (MX(Y) - mx(Y));
		//dump(tmp);
		ans = min(ans, tmp);
	}
	dumpf(ans, 9);
	return 0;
}


Measured memory_bytes: 2288