#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <string>
#include <queue>
#include <fstream>
#include <string>
#include <math.h>
#include <set>
#include <string>
#include <bitset>
#include <fstream>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
//typedef pair<ll, P> T;

#define rep(i, n) for (ll i = 0; i < (n); i++)
#define revrep(i, n) for (ll i = (n) - 1; i >= 0; i--)
#define f first
#define s second
#define pb push_back

ll mod = 1000000007;
const ll INF = 100000000000010000;
//const ull B = 998244353;
//ll kai[3010];

//void pres(double A, ll x = 20) { printf("%.20f\n", x); }

vector<ll> dx = { 0, 1, 0, -1, 1, -1, 1, -1, 0};
vector<ll> dy = { 1, 0, -1, 0, 1, 1, -1, -1, 0};

void chmin(double& x, double y) {
	x = min(x, y);
}

void chmax(double& x, double y) {
	x = max(x, y);
}

ll pow_long(ll x, ll y) {
	ll res = 1;
	while (y > 0) {
		if (y % 2 == 1) res *= x;
		x *= x;
		y /= 2;
	}
	return res;
}

void test() {
	cout << "888888888888888888888888" << endl;
}

ll gcd(ll x, ll y) {
	if (y == 0) return x;
	return gcd(y, x % y);
}

ll pow_mod(ll x, ll k) {
	x %= mod;
	ll res = 1;
	while (k > 0) {
		if (k % 2) {
			res *= x; res %= mod;
		}
		x *= x; x %= mod;
		k /= 2;
	}
	return res;
}

ll div_mod(ll x) {
	return pow_mod(x, mod - 2);
}

//コンビネーション
const int MAXcomb = 1000010;
ll fac[MAXcomb], finv[MAXcomb], inv[MAXcomb];
//facはn!,finvは1/n!
//invは逆元
void COMinit() {
	fac[0] = fac[1] = 1;
	finv[0] = finv[1] = 1;
	inv[1] = 1;
	for (int i = 2; i < MAXcomb; i++) {
		fac[i] = fac[i - 1] * i % mod;
		inv[i] = mod - inv[mod%i] * (mod / i) % mod;
		finv[i] = finv[i - 1] * inv[i] % mod;
	}
}
ll comb(int n, int k) {
	if (n < k) return 0;
	if (n < 0 || k < 0) return 0;
	return fac[n] * finv[k] % mod * finv[n - k] % mod;
}

ll N;
double x[100010], y[100010];
char d[100010];
map<char, ll> pres;
double xmax[4], xmin[4], ymax[4], ymin[4];
vector<double> tm;
double ans;

void solve() {
  pres['U'] = 0, pres['D'] = 1, pres['R'] = 2, pres['L'] = 3;
	cin >> N;
  rep(i, 4) {
    xmax[i] = -INF;
    xmin[i] = INF;
    ymax[i] = -INF;
    ymin[i] = INF;
  }
  rep(i, N) {
    cin >> x[i] >> y[i] >> d[i];
    chmax(xmax[pres[d[i]]], x[i]);
    chmin(xmin[pres[d[i]]], x[i]);
    chmax(ymax[pres[d[i]]], y[i]);
    chmin(ymin[pres[d[i]]], y[i]);
  }
  tm.pb(0);
  if (ymin[0] != INF && ymin[1] != INF) tm.pb(max((double)0, (ymin[1] - ymin[0]) / 2));
  if (ymax[0] != -INF && ymax[1] != -INF) tm.pb(max((double)0, (ymax[1] - ymax[0]) / 2));

  if (ymin[0] != INF && ymin[2] != INF) tm.pb(max((double)0, ymin[2] - ymin[0]));
  if (ymin[0] != INF && ymin[3] != INF) tm.pb(max((double)0, ymin[3] - ymin[0]));
  if (ymax[0] != -INF && ymax[2] != -INF) tm.pb(max((double)0, ymax[2] - ymax[0]));
  if (ymax[0] != -INF && ymax[3] != -INF) tm.pb(max((double)0, ymax[3] - ymax[0]));

  if (ymin[1] != INF && ymin[2] != INF) tm.pb(max((double)0, ymin[1] - ymin[2]));
  if (ymin[1] != INF && ymin[3] != INF) tm.pb(max((double)0, ymin[1] - ymin[3]));
  if (ymax[1] != -INF && ymax[2] != -INF) tm.pb(max((double)0, ymax[1] - ymax[2]));
  if (ymax[1] != -INF && ymax[3] != -INF) tm.pb(max((double)0, ymax[1] - ymax[3]));

  if (xmin[2] != INF && xmin[3] != INF) tm.pb(max((double)0, (xmin[3] - xmin[2]) / 2));
  if (xmax[2] != -INF && xmax[3] != -INF) tm.pb(max((double)0, (xmax[3] - xmax[2]) / 2));

  if (xmin[2] != INF && xmin[0] != INF) tm.pb(max((double)0, xmin[0] - xmin[2]));
  if (xmin[2] != INF && xmin[1] != INF) tm.pb(max((double)0, xmin[1] - xmin[2]));
  if (xmax[2] != -INF && xmax[0] != -INF) tm.pb(max((double)0, xmax[0] - xmax[2]));
  if (xmax[2] != -INF && xmax[1] != -INF) tm.pb(max((double)0, xmax[1] - xmax[2]));

  if (xmin[3] != INF && xmin[0] != INF) tm.pb(max((double)0, xmin[3] - xmin[0]));
  if (xmin[3] != INF && xmin[1] != INF) tm.pb(max((double)0, xmin[3] - xmin[1]));
  if (xmax[3] != -INF && xmax[0] != -INF) tm.pb(max((double)0, xmax[3] - xmax[0]));
  if (xmax[3] != -INF && xmax[1] != -INF) tm.pb(max((double)0, xmax[3] - xmax[1]));
  ans = INF;
  for (double t: tm) {
    double xs = INF, xl = -INF, ys = INF, yl = -INF;
    rep(i, N) {
      double X = x[i], Y = y[i];
      if (d[i] == 'U') Y += t;
      if (d[i] == 'D') Y -= t;
      if (d[i] == 'R') X += t;
      if (d[i] == 'L') X -= t;
      chmax(xl, X), chmin(xs, X), chmax(yl, Y), chmin(ys, Y);
    }
    chmin(ans, (xl - xs) * (yl - ys));
    //cout << xl - xs << endl;
  }
  printf("%.10lf\n", ans);
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	ll T = 1;
	//cin >> T;
	rep(i, T) solve();
}


Measured memory_bytes: 1920