#pragma once

#include <bits/stdc++.h>

#define M_PI       3.14159265358979323846   // pi

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> VI;
typedef pair<ll, ll> P;
typedef tuple<ll, ll, ll> t3;

#define rep(a,n) for(int a = 0;a < n;a++)
#define repi(a,b,n) for(int a = b;a < n;a++)

const ull mod = 1000000007;

template<typename T>
struct TriSearch {
	T solve(T left, T right, function<T(T)> pred, function<bool(T, T)> condition) {
		while (condition(left, right))
		{
			T lmid = (left * 2 + right) / 3;
			T rmid = (left + right * 2) / 3;
			T L = pred(lmid);
			T R = pred(rmid);
			if (L > R) left = lmid;
			else right = rmid;
		}
		return right;

	}
};


int main(void)
{
	ll n;
	cin >> n;
	vector<vector<ll>> vs(n, vector<ll>(4,0));
	rep(i, n) {
		char c;
		cin >> vs[i][0] >> vs[i][1] >> c;
		if (c == 'U') 
		{
			vs[i][2] = 0;
			vs[i][3] = 1;
		}
		else if (c == 'D')
		{
			vs[i][2] = 0;
			vs[i][3] = -1;
		}
		else if (c == 'L')
		{
			vs[i][2] = -1;
			vs[i][3] = 0;
		}
		else
		{
			vs[i][2] = 1;
			vs[i][3] = 0;
		}
	}
	TriSearch<double> t;
	double area = 2e18;
	int count = 0;
	double r = t.solve(0, 1e9, [&](double v) {
		double xmin = 1e18, xmax = -1e18, ymin = 1e18, ymax = -1e18;
		for (auto e : vs) {
			double x = e[0] + e[2] * v;
			double y = e[1] + e[3] * v;
			xmin = min(xmin, x);
			xmax = max(xmax, x);
			ymin = min(ymin, y);
			ymax = max(ymax, y);
		}
		auto a = (xmax - xmin) * (ymax - ymin);
		area = min(a, area);
		return a;
		}, [&](double l, double r) {
			count++;
			return count < 150;
		});
	cout << std::fixed << std::setprecision(15) << area << endl;
	return 0;
}
