#include<iostream>
#include<string>
#include<algorithm>
#include<cstdlib>
#include<cmath>
#include<vector>
#include<list>
#include<cstdint>
#include<bits/stdc++.h>
#include<queue>
#include<set>

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define rep_r(i, n) for(int i = n-1; i >= 0; i--)
#define rep1(i, n) for(int i = 1; i <= (int)(n); i++)
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define all(x) (x).begin(),(x).end()
#define SZ(x) ((ll)(x).size())
#define bit(n) (1LL<<(n))
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );

#define INF bit(60)
#define pb push_back
#define mod 1000000007

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 (b<a) { a=b; return 1; } return 0; }

using namespace std;
using uif=uint_fast64_t;
using ll=long long int;

int qp(int a,ll b){int ans=1;do{if(b&1)ans=1ll*ans*a%mod;a=1ll*a*a%mod;}while(b>>=1);return ans;}
int qp(int a,ll b,int mo){int ans=1;do{if(b&1)ans=1ll*ans*a%mo;a=1ll*a*a%mo;}while(b>>=1);return ans;}

int gcd(int a,int b){return b?gcd(b,a%b):a;}
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};


#define FACSIZE 2002

ll invfac[FACSIZE];
ll fac[FACSIZE];

ll mod_pow(ll ,ll );
ll mod_add(ll ,ll );
ll mod_mul(ll ,ll );
ll mod_div(ll ,ll );
void make_fact(ll );
void make_invfact(ll );

double Diffmax(double,ll,ll,ll,ll,ll,ll);
//double fmin(double,ll,ll,ll);
double f(double,vector<ll> , vector<ll> );

int main(void){

  ll n;
  cin>>n;
  vector<ll> x(n);
  vector<ll> y(n);
  vector<char> d(n);

  set<ll> Fx;
  set<ll> Fy;
  set<ll> VPx;
  set<ll> VPy;
  set<ll> VNx;
  set<ll> VNy;

  rep(i,n){    
    cin>>x[i]>>y[i]>>d[i];
    auto X=x[i];
    auto Y=y[i];
    auto D=d[i];
    switch(D){
      case 'U':
      Fx.insert(X);
      VPy.insert(Y);
      break;
      case 'D':
      Fx.insert(X);
      VNy.insert(Y);
      break;
      case 'R':
      Fy.insert(Y);
      VPx.insert(X);
      break;
      case 'L':
      Fy.insert(Y);
      VNx.insert(X);
      break;
    }
  }
  ll XFMax,YFMax,XFMin,YFMin;
  ll XVPMax,YVPMax,XVPMin,YVPMin;
  ll XVNMax,YVNMax,XVNMin,YVNMin;
  if(Fx.empty()){
    XFMax=INT_MIN;
    XFMin=INT_MAX;
  }
  else{
    XFMax= *(--end(Fx));
    XFMin= *begin(Fx);
  }
  if(Fy.empty()){
    YFMax=INT_MIN;
    YFMin=INT_MAX;
  }
  else{
    YFMax= *(--end(Fy));
    YFMin= *begin(Fy);
  }
  if(VPx.empty()){
    XVPMax=INT_MIN;
    XVPMin=INT_MAX;
  }
  else{
    XVPMax= *(--end(VPx));
    XVPMin= *begin(VPx);
  }
  if(VPy.empty()){
    YVPMax=INT_MIN;
    YVPMin=INT_MAX;
  }
  else{
    YVPMax= *(--end(VPy));
    YVPMin= *begin(VPy);
  }
  if(VNx.empty()){
    XVNMax=INT_MIN;
    XVNMin=INT_MAX;
  }
  else{
    XVNMax= *(--end(VNx));
    XVNMin= *begin(VNx);
  }
  if(VNy.empty()){
    YVNMax=INT_MIN;
    YVNMin=INT_MAX;
  }
  else{
    YVNMax= *(--end(VNy));
    YVNMin= *begin(VNy);
  }

  //vector<double> Thre;
  set<double> ThreSe;

  if(XVNMax!=INT_MIN && XVPMax!=INT_MIN) ThreSe.insert( ((double)XVNMax - (double)XVPMax )/2 );
  if(XFMax!=INT_MIN && XVPMax!=INT_MIN) ThreSe.insert( (double)XFMax - (double)XVPMax );
  if(XFMax!=INT_MIN && XVNMax!=INT_MIN) ThreSe.insert( -(double)XFMax + (double)XVNMax );

  if(XVNMin!=INT_MAX && XVPMin!=INT_MAX) ThreSe.insert( ((double)XVNMin - (double)XVPMin )/2 );
  if(XFMin!=INT_MAX && XVPMin!=INT_MAX) ThreSe.insert( (double)XFMin - (double)XVPMin );
  if(XFMin!=INT_MAX && XVNMin!=INT_MAX) ThreSe.insert( -(double)XFMin + (double)XVNMin );

  if(YVNMax!=INT_MIN && YVPMax!=INT_MIN) ThreSe.insert( ((double)YVNMax - (double)YVPMax )/2 );
  if(YFMax!=INT_MIN && YVPMax!=INT_MIN) ThreSe.insert( ((double)YFMax - (double)YVPMax ) );
  if(YFMax!=INT_MIN && YVNMax!=INT_MIN) ThreSe.insert( (-(double)YFMax + (double)YVNMax ) );

  if(YVNMin!=INT_MAX && YVPMin!=INT_MAX) ThreSe.insert( ((double)YVNMin - (double)YVPMin )/2 );
  if(YFMin!=INT_MAX && YVPMin!=INT_MAX) ThreSe.insert( ((double)YFMin - (double)YVPMin ) );
  if(YFMin!=INT_MAX && YVNMin!=INT_MAX) ThreSe.insert( (-(double)YFMin + (double)YVNMin ) );

  vector<double> Thre;
  //Thre.push_back(0.0);
  for(auto x:ThreSe){
    //cout << x << endl;
    if(x>=0) Thre.push_back(x);
  }


  double ans=f(0, {XVPMax,XVNMax,XFMax,XVPMin,XVNMin,XFMin},{YVPMax,YVNMax,YFMax,YVPMin,YVNMin,YFMin} );

  for(auto t:Thre) ans=min(ans,f(t, {XVPMax,XVNMax,XFMax,XVPMin,XVNMin,XFMin},{YVPMax,YVNMax,YFMax,YVPMin,YVNMin,YFMin} ));

  cout << setprecision(15) << ans << endl;

  return 0;

}

double Diffmax(double t,ll a,ll b,ll c,ll d,ll e,ll f){

  return max({t+a,-t+b,(double)c}) - min({t+d,-t+e,(double)f});

}

double f(double t,vector<ll> xv, vector<ll> yv){

  return Diffmax(t,xv[0],xv[1],xv[2],xv[3],xv[4],xv[5])*Diffmax(t,yv[0],yv[1],yv[2],yv[3],yv[4],yv[5]);

}

ll mod_pow(ll x,ll r){
  if(r==0) return 1;
  else if(r==1) return x%mod;
  else if(r%2==0){
    ll t=mod_pow(x,r/2)%mod;
    return t*t %mod;
  } 
  else{
    ll t=mod_pow(x,r/2)%mod;
    ll k= t*t %mod;
    return k*x%mod;
  } 
}
ll mod_add(ll a,ll b){
  return (a+b)%mod;
}

ll mod_mul(ll a,ll b){
  return (a*b)%mod;
}

ll mod_div(ll a,ll b){
  return mod_mul(a,mod_pow(b,mod-2));
}

void make_fact(ll n){
  fac[0]=1;
  rep(i,n){
    fac[i+1]=mod_mul(fac[i],i+1);
  }  
}

void make_invfact(ll n){
  invfac[n]= mod_pow( fac[n] ,mod-2);
  for(int i=n-1;i>=0;i--){
    invfac[i]=mod_mul(invfac[i+1],i+1);
  }

}


Measured memory_bytes: 10624