#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<ll,ll> pii;
typedef long double ld;

#define fi first
#define se second
#define mp make_pair
#define fastIO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

const ld EPS = 6e-11;
const int N = (int)1e5 + 10;
ld x[N];
ld y[N];
char dir[N];
int n;

ld fx(ld p){
  ld lx=(ld)1e9,rx=-(ld)1e9;
  ld cx;
  for(int i = 0 ; i < n; i ++ ){
    cx = x[i];
    if(dir[i]=='L')cx-=p;
    if(dir[i]=='R')cx+=p;
    lx=min(lx,cx);
    rx=max(rx,cx);
  }
  return (rx - lx);
}

ld fy(ld p){
  ld ly=(ld)1e9,ry=-(ld)1e9;
  ld cy;
  for(int i = 0 ; i < n; i ++ ){
    cy = y[i];
    if(dir[i]=='D')cy-=p;
    if(dir[i]=='U')cy+=p;
    ly=min(ly,cy);
    ry=max(ry,cy);
  }
  return (ry-ly);
}


int main(){
  fastIO;
  cin >> n;
  for(int i = 0; i < n; i ++ ){
    cin >> x[i] >> y[i] >> dir[i];
  }
  ld ans = fx(0)*fy(0);
  ld li = 0, ri = (ld)4e8;
  ld m1, m2;
  ld f1, f2;
  for(int it = 0; it < 300; it ++ ){
    m1 = (li + li + ri) / 3.0;
    m2 = (li + ri + ri) / 3.0;
    f1 = fx(m1)*fy(m1);
    f2 = fx(m2)*fy(m2);
    ans = min(ans, f1);
    ans = min(ans, f2);
    if(fx(m1)*fy(m1)>fx(m2)*fy(m2)){
      li = m1;
    }
    else{
      ri = m2;
    }
  }
  cout << fixed << setprecision(12) << ans << "\n";
  return 0;
}