#include <bits/stdc++.h>
#include <unistd.h>
 
using namespace std;
 
#define DEBUG(x) cerr<<#x<<": "<<x<<endl;
#define DEBUG_VEC(v) cerr<<#v<<":";for(int i=0;i<v.size();i++) cerr<<" "<<v[i]; cerr<<endl
#define DEBUG_MAT(v) cerr<<#v<<endl;for(int i=0;i<v.size();i++){for(int j=0;j<v[i].size();j++) {cerr<<v[i][j]<<" ";}cerr<<endl;}
 
 
typedef long long ll;
#define int ll
 
#define vi vector<int>
#define vl vector<ll>
#define vii vector< vector<int> >
#define vll vector< vector<ll> >
#define vs vector<string>
#define pii pair<int,int>
#define pis pair<int,string>
#define psi pair<string,int>
#define pll pair<ll,ll>
template<class S, class T> pair<S, T> operator+(const pair<S, T> &s, const pair<S, T> &t) { return pair<S, T>(s.first + t.first, s.second + t.second); }
template<class S, class T> pair<S, T> operator-(const pair<S, T> &s, const pair<S, T> &t) { return pair<S, T>(s.first - t.first, s.second - t.second); }
template<class S, class T> ostream& operator<<(ostream& os, pair<S, T> p) { os << "(" << p.first << ", " << p.second << ")"; return os; }
#define X first
#define Y second
#define rep(i,n) for(int i=0;i<(n);i++)
#define rep1(i,n) for(int i=1;i<=(n);i++)
#define rrep(i,n) for(int i=(n)-1;i>=0;i--)
#define rrep1(i,n) for(int i=(n);i>0;i--)
#define REP(i,a,b) for(int i=a;i<b;i++)
#define in(x, a, b) (a <= x && x < b)
#define all(c) c.begin(),c.end()
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; }
#define UNIQUE(v) v.erase(std::unique(v.begin(), v.end()), v.end());
const ll inf = 1000000001;
const ll INF = (ll)1e18 + 1;
const ll MOD = 1000000007;
//const ll MOD = 998244353;
const double pi = 3.14159265358979323846;
#define Sp(p) cout<<setprecision(15)<< fixed<<p<<endl;
int dx[4] = { -1,0, 1,0 }, dy[4] = { 0,1,0,-1 };
int dx2[8] = { 1,1,0,-1,-1,-1,0,1 }, dy2[8] = { 0,1,1,1,0,-1,-1,-1 };
#define fio() cin.tie(0); ios::sync_with_stdio(false);
// #define mp make_pair
//#define endl '\n'

int n;
pair<vector<double>, vi> range(vi x, vector<char> d, char right, char left) {
  int max_right = -inf, max_left = -inf, max_const = -inf;
  vi idx(3, -1);
  rep (i, n) {
    if (d[i] == right) {
      if (max_right < x[i]) {
        max_right = x[i];
        idx[0] = i;
      }
    }
    else if (d[i] == left) {
      if (max_left < x[i]) {
        max_left = x[i];
        idx[1] = i;
      }
    }
    else {
      if (max_const < x[i]) {
        max_const = x[i];
        idx[2] = i;
      }
    }
  }

  vector<double> time;
  if (idx[0] != -1 and idx[1] != -1) {
    time.push_back(abs(x[idx[1]] - x[idx[0]]) / 2.);
  }
  if (idx[0] != -1 and idx[2] != -1) {
    time.push_back(abs(x[idx[2]] - x[idx[0]]));
  }
  if (idx[1] != -1 and idx[2] != -1) {
    time.push_back(abs(x[idx[1]] - x[idx[2]]));
  }
  rep (i, 3) {
    if (idx[i] == -1) idx[i] = 0;
  }
  return make_pair(time, idx);
}

pair<vector<double>, vi> range2(vi x, vector<char> d, char right, char left) {
  int min_right = inf, min_left = inf, min_const = inf;
  vi idx(3, -1);
  rep (i, n) {
    if (d[i] == right) {
      if (min_right > x[i]) {
        min_right = x[i];
        idx[0] = i;
      }
    }
    else if (d[i] == left) {
      if (min_left > x[i]) {
        min_left = x[i];
        idx[1] = i;
      }
    }
    else {
      if (min_const > x[i]) {
        min_const = x[i];
        idx[2] = i;
      }
    }
  }

  vector<double> time;
  if (idx[0] != -1 and idx[1] != -1) {
    time.push_back(abs(x[idx[1]] - x[idx[0]]) / 2.);
  }
  if (idx[0] != -1 and idx[2] != -1) {
    time.push_back(abs(x[idx[2]] - x[idx[0]]));
  }
  if (idx[1] != -1 and idx[2] != -1) {
    time.push_back(abs(x[idx[1]] - x[idx[2]]));
  }
  rep (i, 3) {
    if (idx[i] == -1) idx[i] = 0;
  }
  return make_pair(time, idx);
}


vi x, y;
vector<char> d;

double f(double t, vi &idx) {
  double xmi = INF, xma = -INF, ymi = INF, yma = -INF;
  for (int i: idx) {
  //rep (i, n) {
    double xx, yy;
    if (d[i] == 'U') {
      xx = x[i];
      yy = y[i] + t;
    }
    else if (d[i] == 'D') {
      xx = x[i];
      yy = y[i] - t;
    }
    else if (d[i] == 'R') {
      xx = x[i] + t;
      yy = y[i];
    }
    else if (d[i] == 'L') {
      xx = x[i] - t;
      yy = y[i];
    }
    chmin(xmi, xx);
    chmin(ymi, yy);
    chmax(xma, xx);
    chmax(yma, yy);
  }
  //DEBUG(t);
  //DEBUG(make_pair(make_pair(xmi, xma), make_pair(ymi, yma)));
  return (xma - xmi) * (yma - ymi);
}

double solve(double l, double r, vi idx) {
  double ans = min(f(l, idx), f(r, idx));
  rep (_, 200) {
    //DEBUG(make_pair(l, r));
    double t1 = (2*l + r) / 3., t2 = (l + 2 * r) / 3.;
    double s1 = f(t1, idx), s2 = f(t2, idx);
    if (s1 < s2) {
      r = t2;
    }
    else {
      l = t1;
    }
  }
  return min(ans, f(l, idx));
}

signed main() {
  fio();
  cin >> n;
  x.resize(n);
  y.resize(n);
  d.resize(n);

  rep (i, n) {
    cin >> x[i] >> y[i] >> d[i];
  }

  vector<double> time;
  vi idx;
  auto temp = range(x, d, 'R', 'L');
  time.insert(time.end(), temp.first.begin(), temp.first.end());
  idx.insert(idx.end(), temp.second.begin(), temp.second.end());
  
  temp = range(y, d, 'U', 'D');
  time.insert(time.end(), temp.first.begin(), temp.first.end());
  idx.insert(idx.end(), temp.second.begin(), temp.second.end());
  
  temp = range2(x, d, 'L', 'R');
  time.insert(time.end(), temp.first.begin(), temp.first.end());
  idx.insert(idx.end(), temp.second.begin(), temp.second.end());
  
  temp = range2(y, d, 'D', 'U');
  time.insert(time.end(), temp.first.begin(), temp.first.end());
  idx.insert(idx.end(), temp.second.begin(), temp.second.end());

  time.push_back(0);
  time.push_back(inf);
  sort(all(time));
  UNIQUE(time);
  reverse(all(time));
  while (time.back() < 0) {
    time.pop_back();
  }
  reverse(all(time));

  sort(all(idx));
  UNIQUE(idx);
  //DEBUG_VEC(time);
  //DEBUG_VEC(idx);
  double ans = INF;
  rep (i, time.size() - 1) {
    chmin(ans, f(time[i], idx));
    //chmin(ans, solve(time[i], time[i + 1], idx));
  }
  Sp(ans);
}


Measured memory_bytes: 2928