#include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
using namespace std;
typedef long long ll;
typedef unsigned int ui;
const ll mod = 1000000007;
typedef long double ld;
const ll INF = 1LL<<60;
typedef pair<int, int> P;
#define stop char nyaa;cin>>nyaa;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef complex<ld> Point;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<ld, ld> LDP;
typedef pair<ll, ll> LP;
#define fr first
#define sc second
#define all(c) c.begin(),c.end()
#define pb push_back
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

void Yes(){
	cout<<"Yes"<<endl;
	exit(0);
}
 
void No(){
	cout<<"No"<<endl;
	exit(0);
}

int N;
double x[100100], y[100100];
char d[100100];

double area(double t) {
	double xmi = INF, xma = -INF, ymi = INF, yma = -INF;
	rep(i, N) {
		double cx, cy;
		if(d[i] == 'L') {cx = x[i] - t; cy = y[i];}
		else if(d[i] == 'R') {cx = x[i] + t; cy = y[i];}
		else if(d[i] == 'U') {cx = x[i]; cy = y[i] + t;}
		else {cx = x[i]; cy = y[i] - t;}
		chmin(xmi, cx);
		chmax(xma, cx);
		chmin(ymi, cy);
		chmax(yma, cy);
	}
	return (xma - xmi) * (yma - ymi);
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
    cin >> N;
	rep(i, N) {
		cin >> x[i] >> y[i] >> d[i];
	}
	vector<double> candi;
	candi.pb(0);

	double x1 = -INF, x2 = -INF, x3 = -INF;
	rep(i, N) {
		if(d[i] == 'L') {chmax(x3, x[i]);}
		else if(d[i] == 'R') {chmax(x2, x[i]);}
		else if(d[i] == 'U') {chmax(x1, x[i]);}
		else {chmax(x1, x[i]);}
	}
	if(x1 != -INF && x2 != -INF) candi.pb(abs(x1 - x2));
	if(x1 != -INF && x3 != -INF) candi.pb(abs(x1 - x3));
	if(x2 != -INF && x3 != -INF) candi.pb(abs(x2 - x3) / 2);
 
    x1 = INF, x2 = INF, x3 = INF;
	rep(i, N) {
		if(d[i] == 'L') {chmin(x3, x[i]);}
		else if(d[i] == 'R') {chmin(x2, x[i]);}
		else if(d[i] == 'U') {chmin(x1, x[i]);}
		else {chmin(x1, x[i]);}
	}
	if(x1 != INF && x2 != INF) candi.pb(abs(x1 - x2));
	if(x1 != INF && x3 != INF) candi.pb(abs(x1 - x3));
	if(x2 != INF && x3 != INF) candi.pb(abs(x2 - x3) / 2);

	double y1 = -INF, y2 = -INF, y3 = -INF;
	rep(i, N) {
		if(d[i] == 'L') {chmax(y1, y[i]);}
		else if(d[i] == 'R') {chmax(y1, y[i]);}
		else if(d[i] == 'U') {chmax(y2, y[i]);}
		else {chmax(y3, y[i]);}
	}
	if(y1 != -INF && y2 != -INF) candi.pb(abs(y1 - y2));
	if(y1 != -INF && y3 != -INF) candi.pb(abs(y1 - y3));
	if(y2 != -INF && y3 != -INF) candi.pb(abs(y2 - y3) / 2);

    y1 = INF, y2 = INF, y3 = INF;
	rep(i, N) {
		if(d[i] == 'L') {chmin(y1, y[i]);}
		else if(d[i] == 'R') {chmin(y1, y[i]);}
		else if(d[i] == 'U') {chmin(y2, y[i]);}
		else {chmin(y3, y[i]);}
	}
	if(y1 != INF && y2 != INF) candi.pb(abs(y1 - y2));
	if(y1 != INF && y3 != INF) candi.pb(abs(y1 - y3));
	if(y2 != INF && y3 != INF) candi.pb(abs(y2 - y3) / 2);

	sort(all(candi));
	candi.erase(unique(all(candi)), candi.end());
	double ans = INF;
	for(auto t: candi) {
		double tmp = area(t);
		chmin(ans, tmp);
	}
	cout << fixed << setprecision(10) << ans << endl;
	return 0;
}

Measured memory_bytes: 1920