#include <bits/stdc++.h>
using namespace std;
#define rep(i,N) for(int i=0,i##_max=(N);i<i##_max;++i)
#define repp(i,l,r) for(int i=(l),i##_max=(r);i<i##_max;++i)
#define per(i,N) for(int i=(N)-1;i>=0;--i)
#define perr(i,l,r) for(int i=r-1,i##_min(l);i>=i##_min;--i)
#define all(arr) (arr).begin(), (arr).end()
#define SP << " " <<
#define SPF << " "
#define SPEEDUP cin.tie(0);ios::sync_with_stdio(false);
#define MAX_I INT_MAX //1e9
#define MIN_I INT_MIN //-1e9
#define MAX_UI UINT_MAX //1e9
#define MAX_LL LLONG_MAX //1e18
#define MIN_LL LLONG_MIN //-1e18
#define MAX_ULL ULLONG_MAX //1e19
#define MAX_DBL DBL_MAX
#define MIN_DBL -DBL_MAX
  typedef long long ll;
  typedef pair<int,int> PII;
  typedef pair<char,char> PCC;
  typedef pair<ll,ll> PLL;
  typedef pair<char,int> PCI;
  typedef pair<int,char> PIC;
  typedef pair<ll,int> PLI;
  typedef pair<int,ll> PIL; 
  typedef pair<ll,char> PLC; 
  typedef pair<char,ll> PCL; 

inline void YesNo(bool b){ cout << (b?"Yes" : "No") << endl;}
inline void YESNO(bool b){ cout << (b?"YES" : "NO") << endl;}
inline void Yay(bool b){ cout << (b?"Yay!" : ":(") << endl;}

vector<double> cand(const double stat[],
    const double move_pos[], 
    const double move_neg[]){
  vector<double> v(1,0);
  rep(i,4){
    if(stat[i] != MAX_DBL
    && stat[i] != MIN_DBL
    && move_pos[i] != MAX_DBL
    && move_pos[i] != MIN_DBL ) v.push_back(max(0.0, stat[i] - move_pos[i]) );
    if(stat[i] != MAX_DBL
    && stat[i] != MIN_DBL
    && move_neg[i] != MAX_DBL
    && move_neg[i] != MIN_DBL ) v.push_back(max(0.0, move_neg[i] - stat[i]) );
    if(move_pos[i] != MAX_DBL
    && move_pos[i] != MIN_DBL
    && move_neg[i] != MAX_DBL
    && move_neg[i] != MIN_DBL ) v.push_back(max(0.0, (move_neg[i] - move_pos[i])/2.0) );
  }
  sort(all(v));
  v.erase(unique(all(v)), v.end());
  return v;
}

int main(void){
  SPEEDUP
  cout << setprecision(15);
  int N;cin >> N;
  //0:x最小，1:x最大，2:y最小,3:y最大
  double stat[4] = {MAX_DBL,MIN_DBL,MAX_DBL,MIN_DBL};
  double move_pos[4]= {MAX_DBL,MIN_DBL,MAX_DBL,MIN_DBL};
  double move_neg[4]= {MAX_DBL,MIN_DBL,MAX_DBL,MIN_DBL};

  rep(i,N){
    double x,y;cin >> x >> y;
    char d;cin >> d;
    if(d=='R'){
      if(y<stat[2])stat[2] = y;
      if(y>stat[3])stat[3] = y;
      if(x<move_pos[0])move_pos[0] = x;
      if(x>move_pos[1])move_pos[1] = x;
    }else if(d=='L'){
      if(y<stat[2])stat[2] = y;
      if(y>stat[3])stat[3] = y;
      if(x<move_neg[0])move_neg[0] = x;
      if(x>move_neg[1])move_neg[1] = x;

    }else if(d=='U'){
      if(x<stat[0])stat[0] = x;
      if(x>stat[1])stat[1] = x;
      if(y<move_pos[2])move_pos[2] = y;
      if(y>move_pos[3])move_pos[3] = y;
    }else{
      if(x<stat[0])stat[0] = x;
      if(x>stat[1])stat[1] = x;
      if(y<move_neg[2])move_neg[2] = y;
      if(y>move_neg[3])move_neg[3] = y;
    }
  }
  vector<double> time = cand(stat, move_pos, move_neg);

  double ans = MAX_DBL;
  rep(i,time.size()){
    double min_x = min(move_pos[0] + time[i], move_neg[0] - time[i]); 
    min_x = min(min_x, stat[0]);
    double max_x = max(move_pos[1] + time[i], move_neg[1] - time[i]); 
    max_x = max(max_x, stat[1]);
    double min_y = min(move_pos[2] + time[i], move_neg[2] - time[i]); 
    min_y = min(min_y, stat[2]);
    double max_y = max(move_pos[3] + time[i], move_neg[3] - time[i]); 
    max_y = max(max_y, stat[3]);
    ans = min(ans, (max_y - min_y)*(max_x - min_x));
  }
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 256