// warm heart, wagging tail,and a smile just for you!
//                                                                     ███████████
//                                                                   ███╬╬╬╬╬╬╬╬╬╬███
//                                                                ███╬╬╬╬╬████╬╬╬╬╬╬███
//                                            ███████████       ██╬╬╬╬╬████╬╬████╬╬╬╬╬██
//                                      █████████╬╬╬╬╬████████████╬╬╬╬╬██╬╬╬╬╬╬███╬╬╬╬╬██
//                               ████████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████████╬╬╬╬╬╬██╬╬╬╬╬╬╬██
//                             ████╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████████╬╬╬╬╬╬╬╬╬╬╬██
//                           ███╬╬╬█╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬███╬╬╬╬╬╬╬█████
//                         ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬████████╬╬╬╬╬██
//                       ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬╬╬╬╬╬███
//                     ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬██
//                 ████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████╬╬╬╬╬████
//     █████████████╬╬╬╬╬╬╬╬██╬╬╬╬╬████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬██████
//   ████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬██████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██████╬╬╬╬╬╬╬███████████╬╬╬╬╬╬╬╬██╬╬╬██╬╬╬██
// ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████╬╬╬╬╬╬╬╬╬╬╬█╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬██
// ██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬▓▓▓▓▓▓╬╬╬████╬╬████╬╬╬╬╬╬╬▓▓▓▓▓▓▓▓██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬███
// ██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██████▓▓▓▓▓▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓▓▓▓▓▓▓██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬█████
// ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████████
//   ███╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██
//       ██████████████  ████╬╬╬╬╬╬███████████████████████████╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████
//                         ███████                           █████  ███████████████████
#include "bits/stdc++.h"
using namespace std;
#define MOD 1000000007
//#define MOD 998244353
const double EPS = 1e-9;
#define INF (1LL<<60)
#define D double
#define fs first
#define sc second
#define int long long
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define RFOR(i,a,b) for(int i = (b-1);i>=(a);i--)
#define REP(i,n)  FOR(i,0,(n))
#define RREP(i,n) RFOR(i,0,(n))
#define ITR(itr,mp) for(auto itr = (mp).begin(); itr != (mp).end(); ++itr)
#define RITR(itr,mp) for(auto itr = (mp).rbegin(); itr != (mp).rend(); ++itr)
#define range(i,a,b) ((a)<=(i) && (i)<(b))
#define debug(x)  cout << #x << " = " << (x) << endl;
#define SP << " " << 
typedef pair<int,int> P;
typedef vector<vector<P> > Graph;
typedef vector<int> vec;
typedef vector<vector<int>> mat;

signed main(){
  ios::sync_with_stdio(false);
  cin.tie(0);

  int n;
  cin >> n;

  vector<double> a(n), b(n);
  vector<char> c(n);
  REP(i,n) cin >> a[i] >> b[i] >> c[i];
  
  double xmx = -INF, xmn = INF, ymx = -INF, ymn = INF; //動かない
  double umx = -INF, umn = INF, dmx = -INF, dmn = INF; //動く
  D lmx = -INF, lmn = INF, rmx = -INF, rmn = INF; //動く
  REP(i,n){
    if(c[i] == 'U'){
      xmx = max(xmx,a[i]);
      xmn = min(xmn,a[i]);

      umx = max(umx,b[i]);
      umn = min(umn,b[i]);
    }
    if(c[i] == 'D'){
      xmx = max(xmx,a[i]);
      xmn = min(xmn,a[i]);

      dmx = max(dmx,b[i]);
      dmn = min(dmn,b[i]);
    }
    if(c[i] == 'L'){
      ymx = max(ymx,b[i]);
      ymn = min(ymn,b[i]);

      lmx = max(lmx,a[i]);
      lmn = min(lmn,a[i]);
    }
    if(c[i] == 'R'){
      ymx = max(ymx,b[i]);
      ymn = min(ymn,b[i]);

      rmx = max(rmx,a[i]);
      rmn = min(rmn,a[i]);
    }
  }

  vector<double> t{0};
  t.push_back(ymx-umx);
  t.push_back(ymn-umn);
  t.push_back(ymn-dmn);
  t.push_back(ymn-dmx);
  t.push_back(xmx-rmx);
  t.push_back(xmn-rmn);
  t.push_back(xmn-lmn);
  t.push_back(xmn-lmx);

  t.push_back(((double)dmx-umx)/2);
  t.push_back(((double)rmx-lmx)/2);
  t.push_back(((double)dmn-umn)/2);
  t.push_back(((double)rmn-lmn)/2);

  t.push_back(((double)dmn-umx)/2);
  t.push_back(((double)rmn-lmx)/2);
  t.push_back(((double)dmx-umn)/2);
  t.push_back(((double)rmx-lmn)/2);

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

  //cout << xmx SP xmn SP ymx SP ymx << endl;
  //REP(i,12) cout << t[i] << endl;

  double ans = INF;
  REP(i,t.size()){
    if(t[i] < -1e12) continue;
    if(t[i] < 0) t[i] *= -1;
    if(t[i] > 1e12) break;
    //cout << t[i] << endl;
    double X = -INF, x = INF, Y = -INF, y = INF;
    REP(j,n){
      if(c[j] == 'U'){
        X = max(X,a[j]);
        x = min(x,a[j]);
        Y = max(Y,t[i]+b[j]);
        y = min(y,t[i]+b[j]);
      }
      if(c[j] == 'D'){
        X = max(X,a[j]);
        x = min(x,a[j]);
        Y = max(Y,-t[i]+b[j]);
        y = min(y,-t[i]+b[j]);
      }
      if(c[j] == 'L'){
        Y = max(Y,b[j]);
        y = min(y,b[j]);
        X = max(X,-t[i]+a[j]);
        x = min(x,-t[i]+a[j]);
      }
      if(c[j] == 'R'){
        Y = max(Y,b[j]);
        y = min(y,b[j]);
        X = max(X,t[i]+a[j]);
        x = min(x,t[i]+a[j]);
      }
    }
    //cout << X SP x SP Y SP y << endl;
    ans = min(ans,(X-x)*(Y-y));
  }

  D ans2 = INF;

  int m = 5e7/n;
  REP(i,m){
    //cout << t[i] << endl;
    double X = -INF, x = INF, Y = -INF, y = INF;
    REP(j,n){
      if(c[j] == 'U'){
        X = max(X,a[j]);
        x = min(x,a[j]);
        Y = max(Y,i+b[j]);
        y = min(y,i+b[j]);
      }
      if(c[j] == 'D'){
        X = max(X,a[j]);
        x = min(x,a[j]);
        Y = max(Y,-i+b[j]);
        y = min(y,-i+b[j]);
      }
      if(c[j] == 'L'){
        Y = max(Y,b[j]);
        y = min(y,b[j]);
        X = max(X,-i+a[j]);
        x = min(x,-i+a[j]);
      }
      if(c[j] == 'R'){
        Y = max(Y,b[j]);
        y = min(y,b[j]);
        X = max(X,i+a[j]);
        x = min(x,i+a[j]);
      }
    }
    //cout << X SP x SP Y SP y << endl;
    ans2 = min(ans2,(X-x)*(Y-y));
  }

  cout << fixed << setprecision(12) << min(ans,ans2) << endl;

  return 0;
}


Measured memory_bytes: 1920