// includes
#include <bits/stdc++.h>

// macros
#define ll long long int
#define pb emplace_back
#define mk make_pair
#define pq priority_queue
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define rep(i, n) FOR(i, 0, n)
#define rrep(i, n) for(int i=((int)(n)-1);i>=0;i--)
#define irep(itr, st) for(auto itr = (st).begin(); itr != (st).end(); ++itr)
#define irrep(itr, st) for(auto itr = (st).rbegin(); itr != (st).rend(); ++itr)
#define vrep(v, i) for(int i = 0; i < (v).size(); i++)
#define all(x) (x).begin(),(x).end()
#define sz(x) ((int)(x).size())
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end())
#define FI first
#define SE second
#define dump(a, n) for(int i = 0; i < n; i++)cout << a[i] << "\n "[i + 1 != n];
#define dump2(a, n, m) for(int i = 0; i < n; i++)for(int j = 0; j < m; j++)cout << a[i][j] << "\n "[j + 1 != m];
#define bit(n) (1LL<<(n))
#define INT(n) int n; cin >> n;
#define LL(n) ll n; cin >> n;
#define DOUBLE(n) double n; cin >> n;
using namespace std;

//  types
typedef pair<int, int> P;
typedef pair<ll, int> Pl;
typedef pair<ll, ll> Pll;
typedef pair<double, double> Pd;
typedef complex<double> cd;
 
// constants
const int inf = 1e9;
const ll linf = 1LL << 50;
const double EPS = 1e-10;
const int mod = 1e9 + 7;
const int dx[4] = {-1, 0, 1, 0};
const int dy[4] = {0, -1, 0, 1};

// solve
template <class T>bool chmax(T &a, const T &b){if(a < b){a = b; return 1;} return 0;}
template <class T>bool chmin(T &a, const T &b){if(a > b){a = b; return 1;} return 0;}
template <typename T> istream &operator>>(istream &is, vector<T> &vec){for(auto &v: vec)is >> v; return is;}
template <typename T> ostream &operator<<(ostream &os, const vector<T>& vec){for(int i = 0; i < vec.size(); i++){ os << vec[i]; if(i + 1 != vec.size())os << " ";} return os;}
template <typename T> ostream &operator<<(ostream &os, const set<T>& st){for(auto itr = st.begin(); itr != st.end(); ++itr){ os << *itr; auto titr = itr; if(++titr != st.end())os << " ";} return os;}
template <typename T> ostream &operator<<(ostream &os, const unordered_set<T>& st){for(auto itr = st.begin(); itr != st.end(); ++itr){ os << *itr; auto titr = itr; if(++titr != st.end())os << " ";} return os;}
template <typename T> ostream &operator<<(ostream &os, const multiset<T>& st){for(auto itr = st.begin(); itr != st.end(); ++itr){ os << *itr; auto titr = itr; if(++titr != st.end())os << " ";} return os;}
template <typename T> ostream &operator<<(ostream &os, const unordered_multiset<T>& st){for(auto itr = st.begin(); itr != st.end(); ++itr){ os << *itr; auto titr = itr; if(++titr != st.end())os << " ";} return os;}
template <typename T1, typename T2> ostream &operator<<(ostream &os, const pair<T1, T2> &p){os << p.first << " " << p.second; return os;}
template <typename T1, typename T2> ostream &operator<<(ostream &os, const map<T1, T2> &mp){for(auto itr = mp.begin(); itr != mp.end(); ++itr){ os << itr->first << ":" << itr->second; auto titr = itr; if(++titr != mp.end())os << " "; } return os;}
template <typename T1, typename T2> ostream &operator<<(ostream &os, const unordered_map<T1, T2> &mp){for(auto itr = mp.begin(); itr != mp.end(); ++itr){ os << itr->first << ":" << itr->second; auto titr = itr; if(++titr != mp.end())os << " "; } return os;}

int main(int argc, char const* argv[])
{
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(20);
  INT(n); vector<ll> x(n), y(n); vector<char> d(n); rep(i, n)cin >> x[i] >> y[i] >> d[i];
  vector<double> xm, xs, xp, ym, ys, yp;
  rep(i, n){
  	if(d[i] == 'L')xm.pb(x[i]), ys.pb(y[i]);
  	if(d[i] == 'R')xp.pb(x[i]), ys.pb(y[i]);
  	if(d[i] == 'U')xs.pb(x[i]), yp.pb(y[i]);
  	if(d[i] == 'D')xs.pb(x[i]), ym.pb(y[i]);
  }
  sort(all(xm)); sort(all(xs)); sort(all(xp));
  sort(all(ym)); sort(all(ys)); sort(all(yp));
  auto calc = [&](double m){
  	double xmaxi = -1e15, xmini = 1e15, ymaxi = -1e15, ymini = 1e15;
  	rep(i, n){
  		double xx = x[i];
  		if(d[i] == 'L')xx -= m;
  		if(d[i] == 'R')xx += m;
  		double yy = y[i];
  		if(d[i] == 'U')yy += m;
  		if(d[i] == 'D')yy -= m;
  		xmaxi = max(xmaxi, xx);
  		xmini = min(xmini, xx);
  		ymaxi = max(ymaxi, yy);
  		ymini = min(ymini, yy);
  	}
  	return (xmaxi - xmini) * (ymaxi - ymini);
  };
  double xmini = 1e12;
  if(sz(xm))xmini = min(xmini, xm[0]);
  if(sz(xs))xmini = min(xmini, xs[0]);
  if(sz(xp))xmini = min(xmini, xp[0]);
  vector<double> T;
  T.pb(0.);
  if(sz(xp) && xp[0] == xmini){
  	if(sz(xs))T.pb(xs[0] - xp[0]);
  	if(sz(xm))T.pb(double(xm[0] - xp[0])/2.);
  }
  if(sz(xs) && xs[0] == xmini){
  	if(sz(xm))T.pb(xm[0] - xs[0]);
  }
  double xmaxi = -1e12;
  reverse(all(xm));
  reverse(all(xp));
  reverse(all(xs));
  if(sz(xm))xmaxi = max(xmaxi, xm[0]);
  if(sz(xs))xmaxi = max(xmaxi, xs[0]);
  if(sz(xp))xmaxi = max(xmaxi, xp[0]);
  if(sz(xm) && xm[0] == xmaxi){
  	if(sz(xs))T.pb(xm[0] - xs[0]);
  	if(sz(xp))T.pb(double(xm[0] - xp[0])/2.);
  }
  if(sz(xs) && xs[0] == xmaxi){
  	if(sz(xp))T.pb(xs[0] - xp[0]);
  }
  double ymini = 1e12;
  if(sz(ym))ymini = min(ymini, ym[0]);
  if(sz(ys))ymini = min(ymini, ys[0]);
  if(sz(yp))ymini = min(ymini, yp[0]);
  if(sz(yp) && yp[0] == ymini){
  	if(sz(ys))T.pb(ys[0] - yp[0]);
  	if(sz(ym))T.pb(double(ym[0] - yp[0])/2.);
  }
  if(sz(ys) && ys[0] == ymini){
  	if(sz(ym))T.pb(ym[0] - ys[0]);
  }
  double ymaxi = -1e12;
  reverse(all(ym));
  reverse(all(yp));
  reverse(all(ys));
  if(sz(ym))ymaxi = max(ymaxi, ym[0]);
  if(sz(ys))ymaxi = max(ymaxi, ys[0]);
  if(sz(yp))ymaxi = max(ymaxi, yp[0]);
  if(sz(ym) && ym[0] == ymaxi){
  	if(sz(ys))T.pb(ym[0] - ys[0]);
  	if(sz(yp))T.pb(double(ym[0] - yp[0])/2.);
  }
  if(sz(ys) && ys[0] == ymaxi){
  	if(sz(yp))T.pb(ys[0] - yp[0]);
  }
  double res = 1e20;
  for(auto m: T){
  	res = min(res, calc(m));
  }
  sort(all(T));
  for(int i = 0; i < sz(T) - 1; i++){
  	  double ld = T[i], rd = T[i+1];
	  rep(i_, 100){
	  	double m1 = ld + (rd - ld) / 3.;
	  	double m2 = m1 + (rd - ld) / 3.;
	  	double s1 = calc(m1);
	  	double s2 = calc(m2);
	  	if(s1 > s2)ld = m1;
	  	else rd = m2;
	  }
  res = min(res, calc(ld));
  }
  cout << res << endl;
  return 0;
}

Measured memory_bytes: 3952