// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;



#ifdef DGC

#include "debug.h"

#else

#define debug(...) 9715

#endif

typedef long long ll;

typedef long double ld;

typedef complex<ll> point;

#define F first

#define S second







int main()

{

	#ifdef DGC

		freopen("a.in", "r", stdin);

		//freopen("a.out", "w", stdout);

	#endif



	ios_base::sync_with_stdio(0), cin.tie(0);



	int n;

	cin >> n;

	map<char, vector<pair<int, int>>> mp;

	char z;

	for (int i = 0, x, y; i < n; ++i)

	{

		cin >> x >> y >> z;

		mp[z].push_back({ x, y });

	}



	int mnx = 1e9, mxx = -1e9, mny = 1e9, mxy = -1e9;

	for (auto i : mp['L']) mny = min(mny, i.S), mxy = max(mxy, i.S);

	for (auto i : mp['R']) mny = min(mny, i.S), mxy = max(mxy, i.S);

	for (auto i : mp['U']) mnx = min(mnx, i.F), mxx = max(mxx, i.F);

	for (auto i : mp['D']) mnx = min(mnx, i.F), mxx = max(mxx, i.F);



	auto f1 = [&](ld md)

	{

		ld fmn = mnx, fmx = mxx;

		for (auto i : mp['L'])

		{

			fmn = min(fmn, i.F - md);

			fmx = max(fmx, i.F - md);

		}

		for (auto i : mp['R'])

		{

			fmn = min(fmn, i.F + md);

			fmx = max(fmx, i.F + md);

		}

		fmn = min(fmn, fmx);

		return fmx-fmn;

	};



	auto f2 = [&](ld md)

	{

		ld fmn = mny, fmx = mxy;

		for (auto i : mp['D'])

		{

			fmn = min(fmn, i.S - md);

			fmx = max(fmx, i.S - md);

		}

		for (auto i : mp['U'])

		{

			fmn = min(fmn, i.S + md);

			fmx = max(fmx, i.S + md);

		}

		fmn = min(fmn, fmx);

		return fmx-fmn;

	};



	ld l = 0, r = 1e9+5;

	for (int it = 200; it--; )

	{

		ld md1 = l + (r-l) / 3.0;

		ld md2 = r - (r-l) / 3.0;

		if (f1(md1) * f2(md1) < f1(md2) * f2(md2))

			r = md2;

		else

			l = md1;

	}



	cout << setprecision(20) << fixed << f1(l) * f2(l) << "\n";



	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 1.2530404503920454x):
#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>

#include <ext/pb_ds/tree_policy.hpp>

#include <random>

#include <chrono>



using namespace std;

using namespace __gnu_pbds;



#define endl '\n'



typedef long long ll;

typedef pair<int, int> pii;

//typedef tree<int,null_type,less<int>,rb_tree_tag, tree_order_statistics_node_update> indexed_set;



//mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());



const double oo = 1e11;

const int maxn = 1e5 + 5;



ll x[maxn], y[maxn];

ll vx[maxn], vy[maxn];

int n;





double f(double t){

	

	double mnX = oo, mxX = -oo, mnY = oo, mxY = -oo;

	

	for(int i = 0; i < n; i++){

		double nx = 1.0 * x[i] + 1.0 * t * vx[i];

		double ny = 1.0 * y[i] + 1.0 * t * vy[i];

		

		mnX = min(mnX, nx);

		mxX = max(mxX, nx);

		mnY = min(mnY, ny);

		mxY = max(mxY, ny);

	}

	

	return (mxX - mnX) * (mxY - mnY);

}



int main(){

	ios_base::sync_with_stdio(0);

	cin.tie(0);



	//freopen("input.txt", "r", stdin);

	//freopen("output.txt", "w", stdout);

	

	cin >> n;

	

	for(int i = 0; i < n; i++){

		cin >> x[i] >> y[i];

		char c;

		cin >> c;

		

		if(c == 'U')

			vy[i] = +1;

		if(c == 'D')

			vy[i] = -1;

		if(c == 'R')

			vx[i] = +1;

		if(c == 'L')

			vx[i] = -1; 

	}

	

	double lo = 0.0, hi = oo;

	

	for(int i = 0; i < 150; i++){

		double third = (hi - lo) / 3.0;

		double p1 = lo + third;

		double p2 = hi - third;

		

		if(f(p1) < f(p2))

			hi = p2;

		else

			lo = p1;

	}

	

	cout << setprecision(10) << fixed;

	cout << f(lo) << endl;



	return 0;

}