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

void file(bool opt)
{
	if (opt&&fopen("in.txt", "r"))
	{
		freopen("in.txt", "r", stdin);
		//freopen("out.txt", "w", stdout);
	}
}

int n;
bool U, D, L, R;
double uU = -0x3f3f3f3f, uD = 0x3f3f3f3f, uL = 0x3f3f3f3f, uR = -0x3f3f3f3f;
double dU = -0x3f3f3f3f, dD = 0x3f3f3f3f, dL = 0x3f3f3f3f, dR = -0x3f3f3f3f;
double lU = -0x3f3f3f3f, lD = 0x3f3f3f3f, lL = 0x3f3f3f3f, lR = -0x3f3f3f3f;
double rU = -0x3f3f3f3f, rD = 0x3f3f3f3f, rL = 0x3f3f3f3f, rR = -0x3f3f3f3f;
vector<double>tt;

int main()
{
	scanf("%d", &n);
	for (int i = 1; i <= n; i++)
	{
		double x, y;
		char opt;
		cin >> x >> y >> opt;
		if (opt == 'U')
		{
			U = 1;
			uU = max(uU, y);
			uD = min(uD, y);
			uL = min(uL, x);
			uR = max(uR, x);
		}
		if (opt == 'D')
		{
			D = 1;
			dU = max(dU, y);
			dD = min(dD, y);
			dL = min(dL, x);
			dR = max(dR, x);
		}
		if (opt == 'L')
		{
			L = 1;
			lU = max(lU, y);
			lD = min(lD, y);
			lL = min(lL, x);
			lR = max(lR, x);
		}
		if (opt == 'R')
		{
			R = 1;
			rU = max(rU, y);
			rD = min(rD, y);
			rL = min(rL, x);
			rR = max(rR, x);
		}
	}
	tt.push_back(0);
	if (L&&R)
	{
		tt.push_back(0.5*abs(rR - lR));
		tt.push_back(0.5*abs(rR - lL));
		tt.push_back(0.5*abs(rL - lR));
		tt.push_back(0.5*abs(rL - lL));
	}
	if (U&&D)
	{
		tt.push_back(0.5*abs(uU - dU));
		tt.push_back(0.5*abs(uU - dD));
		tt.push_back(0.5*abs(uD - dU));
		tt.push_back(0.5*abs(uD - dD));
	}
	if (R && (U || D))
	{
		if (U)//rL,rR, (uR,uL)(dR,dL)
		{
			tt.push_back(abs(rL - uR));
			tt.push_back(abs(rL - uL));
			tt.push_back(abs(rR - uR));
			tt.push_back(abs(rR - uL));
		}
		if (D)
		{
			tt.push_back(abs(rL - dR));
			tt.push_back(abs(rL - dL));
			tt.push_back(abs(rR - dR));
			tt.push_back(abs(rR - dL));
		}
	}
	if (L && (U || D))
	{
		if (U)//rL,rR, (uR,uL)(dR,dL)
		{
			tt.push_back(abs(lL - uR));
			tt.push_back(abs(lL - uL));
			tt.push_back(abs(lR - uR));
			tt.push_back(abs(lR - uL));
		}
		if (D)
		{
			tt.push_back(abs(lL - dR));
			tt.push_back(abs(lL - dL));
			tt.push_back(abs(lR - dR));
			tt.push_back(abs(lR - dL));
		}
	}
	if (U && (L || R))
	{
		if (L)//uU,uD,(lU,lD)(rU,rD)
		{
			tt.push_back(abs(uU - lU));
			tt.push_back(abs(uU - lD));
			tt.push_back(abs(uD - lU));
			tt.push_back(abs(uD - lD));
		}
		if (R)
		{
			tt.push_back(abs(uU - rU));
			tt.push_back(abs(uU - rD));
			tt.push_back(abs(uD - rU));
			tt.push_back(abs(uD - rD));
		}
	}
	if (D && (L || R))
	{
		if (L)//dU,dD,(lU,lD)(rU,rD)
		{
			tt.push_back(abs(dU - lU));
			tt.push_back(abs(dU - lD));
			tt.push_back(abs(dD - lU));
			tt.push_back(abs(dD - lD));
		}
		if (R)
		{
			tt.push_back(abs(dU - rU));
			tt.push_back(abs(dU - rD));
			tt.push_back(abs(dD - rU));
			tt.push_back(abs(dD - rD));
		}
	}

	sort(tt.begin(), tt.end());
	tt.erase(unique(tt.begin(), tt.end()), tt.end());
	double ans = 0x3f3f3f3f3f3f3f3f;
	for (double x : tt)
	{
		double xmin = min({ lL - x, rL + x, uL, dL });
		double xmax = max({ lR - x,rR + x,uR,dR });
		double ymax = max({ uU + x,dU - x,rU,lU });
		double ymin = min({ uD + x,dD - x,rD,lD });
		ans = min(ans, (xmax - xmin)*(ymax - ymin));
	}
	printf("%.9lf\n", ans);
	return 0;
}

Measured memory_bytes: 256