#include <bits/stdc++.h>	
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define ld long double
#define pii pair <int, int>
#define sz(a) (int)(a.size()) 
#define resize(v) v.resize(unique(all(v)) - v.begin()); 
#define all(a) a.begin(), a.end()
#define forit(it, s) for(__typeof(s.begin()) it = s.begin(); it != s.end(); it ++)
 
// random_device rd; mt19937 g(rd());
 
using namespace std;
 
void Fast_Read_Out()
{
    ios_base::sync_with_stdio(0);
    cin.tie(), cout.tie();
}
 
void Random()
{
    unsigned int seed;                                                                        
    asm("rdtsc" : "=A" (seed));
    srand(seed);        
}
 
unsigned int Time()
{
     unsigned int time = clock() / 1000.00;                           
     return time;
}
 
const int mod = (int)1e9 + 7;
const int N = (int)1e5 + 123;
const ld eps = 1e-10;
 
int n;
ld x[N], y[N];
char d[N];
 
ld f(ld k)
{
	ld xmax = -1e9, xmin = 1e9;
	ld ymax = -1e9, ymin = 1e9;
	for(int i = 1; i <= n; i++)
	{
		ld curx = x[i], cury = y[i];
		if(d[i] == 'U') cury += k;
		if(d[i] == 'D') cury -= k;
		if(d[i] == 'R') curx += k;
		if(d[i] == 'L') curx -= k;
		xmax = max(xmax, curx);
		xmin = min(xmin, curx);
		ymax = max(ymax, cury);
		ymin = min(ymin, cury);
	}
	xmax -= xmin;
	ymax -= ymin;
	xmax *= ymax;
	return (ld)xmax;
}
 
int main ()
{                                  	
	#ifdef JUDGE
		freopen("input.txt", "r", stdin);
	#endif		
	Fast_Read_Out();
	Random();
	cin >> n;  
	for(int i = 1; i <= n; i++) cin >> x[i] >> y[i] >> d[i];
	ld l = 0.0, r = 1e9;
	for(int i = 1; i <= 500; i++)
	{
		ld m1 = l + (r - l) / 3;
		ld m2 = r - (r - l) / 3;
		if(f(m1) > f(m2)) l = m1;
		else r = m2;
	}
	cout << fixed << min(f(r), f(l));
}  