#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define F first
#define S second
#define pii pair<int, int>
#define eb emplace_back
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep3(i, l, n) for (int i = l; i < (n); ++i)
#define sz(v) (int)v.size()
const int inf = 1e9 + 7;
const ll INF = 1e18;
// int mod = 998244353;
int mod = 1000000007;
#define abs(x) (x >= 0 ? x : -(x))
#define lb(v, x) (int)(lower_bound(all(v), x) - v.begin())
#define ub(v, x) (int)(upper_bound(all(v), x) - v.begin())
template<typename T1, typename T2> inline bool chmin(T1 &a, T2 b) { if (a > b) { a = b; return 1; } return 0; }
template<typename T1, typename T2> inline bool chmax(T1 &a, T2 b) { if (a < b) { a = b; return 1; } return 0; }
template<typename T> T gcd(T a, T b) { if (b == 0) return a; return gcd(b, a % b); }
template<typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; }
ll pow(ll a, int b) { return b ? pow(a * a, b / 2) * (b % 2 ? a : 1) : 1; }
ll modpow(ll a, ll b, ll _mod) { return b ? modpow(a * a % _mod, b / 2, _mod) * (b % 2 ? a : 1) % _mod : 1; }
template<class T> ostream& operator << (ostream& os, const vector<T>& vec) { for (auto &vi: vec) os << vi << " "; return os; }
template<class T, class U> ostream& operator << (ostream& os, const pair<T, U>& p) { os << p.F << " " << p.S; return os; }
template<typename T> inline istream& operator >> (istream& is, vector<T>& v) { rep(j, sz(v)) is >> v[j]; return is; }
template<class T, class T2> inline void add(T &a, T2 b) { a += b; if (a >= mod) a -= mod; }


void solve();

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(10);

  int T;
  // cin >> T;
  T = 1;

  while (T--) {
    solve();
  }
}

vector<int> U(3), D(3), L(3), R(3);
double eps = 1e-8;
double f(double x) {
  double t1 = max({1.0 * U[0], D[2] - x, U[2] + x});
  double t2 = min({1.0 * D[0], D[1] - x, U[1] + x});
  double tate = abs(t1 - t2);
  double y1 = max({1.0 * R[0], L[2] - x, R[2] + x});
  double y2 = min({1.0 * L[0], L[1] - x, R[1] + x});
  double yoko = abs(y1 - y2);
  // cout << "t y " << t1 << " " << t2 << " " << y1 << " " << y2 << endl;
  return tate * yoko;
}

void solve() {
  int n;
  cin >> n;
  if (n == 1) { // debuged
    cout << 0 << endl;
    return;
  }
  vector<int> x(n), y(n);
  vector<char> p(n);
  rep(i, n) cin >> x[i] >> y[i] >> p[i];
  {
    U[0] = -inf; D[0] = inf; L[0] = inf; R[0] = -inf;
    U[1] = inf; D[1] = inf; L[1] = inf; R[1] = inf;
    U[2] = -inf; D[2] = -inf; L[2] = -inf; R[2] = -inf;
  }
  {
    vector<int> v;
    rep(i, n) if (p[i] == 'L' || p[i] == 'R') {
      v.eb(y[i]);
    }
    sort(all(v));
    if (sz(v)) {
      U[0] = v[sz(v) - 1];
      D[0] = v[0];
    }
    v.clear();
    rep(i, n) if (p[i] == 'D') {
      v.eb(y[i]);
    }
    sort(all(v));
    if (sz(v)) {
      D[1] = v[0];
      D[2] = v[sz(v) - 1];
    }
    v.clear();
    rep(i, n) if (p[i] == 'U') {
      v.eb(y[i]);
    }
    sort(all(v));
    if (sz(v)) {
      U[1] = v[0];
      U[2] = v[sz(v) - 1];
    }
  }
  // cout << endl; rep(i, 3) cout << L[i] << " " << R[i] << " " << U[i] << " " << D[i] << endl;
  {
    vector<int> v;
    rep(i, n) if (p[i] == 'U' || p[i] == 'D') {
      v.eb(x[i]);
    }
    sort(all(v));
    if (sz(v)) {
      R[0] = v[sz(v) - 1];
      L[0] = v[0];
    }
    v.clear();
    rep(i, n) if (p[i] == 'L') {
      v.eb(x[i]);
    }
    sort(all(v));
    if (sz(v)) {
      L[1] = v[0];
      L[2] = v[sz(v) - 1];
    }
    v.clear();
    rep(i, n) if (p[i] == 'R') {
      v.eb(x[i]);
    }
    sort(all(v));
    if (sz(v)) {
      R[1] = v[0];
      R[2] = v[sz(v) - 1];
    }
  }
  // cout << endl; rep(i, 3) cout << L[i] << " " << R[i] << " " << U[i] << " " << D[i] << endl;
  double l = 0, r = inf;
  // cout << f((l * 2 + r) / 3.0) << " " << f((l + r * 2) / 3.0)<< endl;
  // cout << f(0) << endl;

  int c = 0;
  while (c++ < 1000) {
    double l2 = (l * 2 + r) / 3.0;
    double r2 = (l + r * 2) / 3.0;
    // cout << l << " " << r << " " << f(l2) << " " << f(r2) << '\n';
    if (f(l2) > f(r2)) l = l2;
    else r = r2;
  }
  // cout << r << endl;
  cout << f(r) << '\n'; // r や !!

}


Measured memory_bytes: 1600