#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <string>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <stdio.h>
using namespace std;
#define int long long
int MOD = 1000000007;
vector<int> X;
vector<int> Y;
vector<int> DX;
vector<int> DY;
int N;
double solve(double a)
{

	double mxx = -1e18;
	double mnx = 1e18;
	double mxy = -1e18;
	double mny = 1e18;


	for (int i = 0; i < N; i++)
    {
		double x = X[i] + a * DX[i];
		double y = Y[i] + a * DY[i];

		mxx = max(mxx, x);
		mnx = min(mnx, x);

		mxy = max(mxy, y);
		mny = min(mny, y);
	}

	return (mxx - mnx) * (mxy - mny);
}
signed main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	cin >> N;
	X.resize(N);
	Y.resize(N);
	DX.resize(N, 0);
	DY.resize(N, 0);
	char dd;
	for (int i = 0; i < N; i++)
    {
		cin >> X[i] >> Y[i] >> dd;

		if (dd == 'U')
        {
			DY[i] = 1;
		}
		else if (dd == 'D')
		{
			DY[i] = -1;
		}
		else if (dd == 'R')
		{
			DX[i] = 1;
		}
		else if (dd == 'L')
        {
			DX[i] = -1;
		}
	}
	double res = 1e18;

	double u = 1e9;
	double d = 0;

	for (int t = 0; t < 200; t++)
    {

		double uu = (u * 2 + d) / 3;
		double dd = (u + d * 2) / 3;

		double uv = solve(uu);
		double dv = solve(dd);
		res = min(res, uv);
		res = min(res, dv);
		if (dv < uv)
        {
			u = uu;
		}
		else
		{
			d = dd;
		}

	}


	cout << fixed << setprecision(15) << res << endl;
}
