// Original C++ solution (slower):
#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<bitset>

#include<stack>

#include<unordered_map>

#include<utility>

#include<cassert>

using namespace std;



typedef long long ll;



typedef unsigned long long ul;

typedef unsigned int ui;

const ll mod = 1000000007;

const ll INF = mod * mod;

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 pair<ll, ll> LP;

typedef vector<int> vec;

typedef vector<string> svec;

typedef long double ld;

typedef pair<ld, ld> LDP;

const ld eps = 1e-8;



int dx[4] = { 1,-1,0,0 };

int dy[4] = { 0,0,1,-1 };



vector<LDP> v;

vector<int> dir;

ld calc(ld t) {

	ld xmi = INF, xma = -INF;

	ld ymi = INF, yma = -INF;

	rep(i, v.size()) {

		ld nx = t * dx[dir[i]] + v[i].first;

		ld ny = t * dy[dir[i]] + v[i].second;

		xmi = min(xmi, nx);

		xma = max(xma, nx);

		ymi = min(ymi, ny);

		yma = max(yma, ny);

	}

	return (xma - xmi)*(yma - ymi);

}

void solve() {

	int n; cin >> n; v.resize(n); dir.resize(n);

	vector<ld> u, d, l, r;

	ld xmi = INF, xma = -INF;

	ld ymi = INF, yma = -INF;

	rep(i, n) {

		ld x, y; cin >> x >> y;

		v[i] = { x,y };

		char t; cin >> t;

		if (t == 'L') {

			dir[i] = 1;

			l.push_back(x);

			ymi = min(ymi, y);

			yma = max(yma, y);

		}

		else if (t == 'R') {

			dir[i] = 0;

			r.push_back(x);

			ymi = min(ymi, y);

			yma = max(yma, y);

		}

		else if (t == 'U') {

			dir[i] = 2;

			u.push_back(y);

			xmi = min(xmi, x);

			xma = max(xma, x);

		}

		else {

			dir[i] = 3;

			d.push_back(y);

			xmi = min(xmi, x);

			xma = max(xma, x);

		}

	}

	ld le = 0, ri = mod;

	rep(aa, 200) {

		ld ml = (le * 2 + ri) / 3.0;

		ld mr = (le + ri * 2) / 3.0;

		ld cl = calc(ml);

		ld cr = calc(mr);

		if (cl < cr)ri = mr;

		else le = ml;

	}

	cout << calc(le) << endl;

}



signed main() {

	ios::sync_with_stdio(false);

	cin.tie(0);

	cout << fixed << setprecision(10);

	//init();

	solve();

	//stop

	return 0;

}


// Optimized solution to the same problem (faster):
#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<bitset>

#include<stack>

#include<unordered_map>

#include<utility>

#include<cassert>

using namespace std;



typedef long long ll;



typedef unsigned long long ul;

typedef unsigned int ui;

const ll mod = 1000000007;

const ll INF = mod * mod;

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 pair<ll, ll> LP;

typedef vector<int> vec;

typedef vector<string> svec;

typedef long double ld;

typedef pair<ld, ld> LDP;

const ld eps = 1e-8;



int dx[4] = { 1,-1,0,0 };

int dy[4] = { 0,0,1,-1 };



vector<LDP> v;

vector<int> dir;

ld calc(ld t) {

	ld xmi = INF, xma = -INF;

	ld ymi = INF, yma = -INF;

	rep(i, v.size()) {

		ld nx = t * dx[dir[i]] + v[i].first;

		ld ny = t * dy[dir[i]] + v[i].second;

		xmi = min(xmi, nx);

		xma = max(xma, nx);

		ymi = min(ymi, ny);

		yma = max(yma, ny);

	}

	return (xma - xmi)*(yma - ymi);

}

void solve() {

	int n; cin >> n; v.resize(n); dir.resize(n);

	vector<ld> u, d, l, r;

	ld xmi = INF, xma = -INF;

	ld ymi = INF, yma = -INF;

	rep(i, n) {

		ld x, y; cin >> x >> y;

		v[i] = { x,y };

		char t; cin >> t;

		if (t == 'L') {

			dir[i] = 1;

			l.push_back(x);

			ymi = min(ymi, y);

			yma = max(yma, y);

		}

		else if (t == 'R') {

			dir[i] = 0;

			r.push_back(x);

			ymi = min(ymi, y);

			yma = max(yma, y);

		}

		else if (t == 'U') {

			dir[i] = 2;

			u.push_back(y);

			xmi = min(xmi, x);

			xma = max(xma, x);

		}

		else {

			dir[i] = 3;

			d.push_back(y);

			xmi = min(xmi, x);

			xma = max(xma, x);

		}

	}

	sort(u.begin(), u.end());

	sort(d.begin(), d.end());

	sort(l.begin(), l.end());

	sort(r.begin(), r.end());

	vector<ld> t; t.push_back(0);

	if (!u.empty()) {

		if (u.back() < yma) {

			t.push_back(yma - u.back());

		}

		if (u[0] < ymi) {

			t.push_back(ymi - u[0]);

		}

	}

	if (!d.empty()) {

		if (d.back() > yma) {

			t.push_back(d.back() - yma);

		}

		if (d[0] > ymi) {

			t.push_back(d[0] - ymi);

		}

	}

	if (!u.empty() && !d.empty()) {

		if (d.back() > u.back()) {

			t.push_back((d.back() - u.back()) / 2.0);

		}

		if (u[0] < d[0]) {

			t.push_back((d[0] - u[0]) / 2.0);

		}

	}

	if (!r.empty()) {

		if (r.back() < xma) {

			t.push_back(xma - r.back());

		}

		if (r[0] < xmi) {

			t.push_back(xmi - r[0]);

		}

	}

	if (!l.empty()) {

		if (l.back() > xma) {

			t.push_back(l.back() - xma);

		}

		if (l[0] > xmi) {

			t.push_back(l[0] - xmi);

		}

	}

	if (!l.empty() && !r.empty()) {

		if (l.back() > r.back()) {

			t.push_back((l.back() - r.back()) / 2.0);

		}

		if (l[0] > r[0]) {

			t.push_back((l[0] - r[0]) / 2.0);

		}

	}

	sort(t.begin(), t.end());

	ld ans = INF;

	rep(i, (int)t.size()) {

		ans = min(ans, calc(t[i]));

	}

	cout << ans << endl;

}



signed main() {

	ios::sync_with_stdio(false);

	cin.tie(0);

	cout << fixed << setprecision(10);

	//init();

	solve();

	//stop

	return 0;

}


// Fastest known solution for this problem: