//code by lynmisakura.wish to be accepted!
/****************************/
#include<iostream>
#include<iomanip>
#include<math.h>
#include<vector>
#include<string>
#include<stack>
#include<queue>
#include<map>
#include<algorithm>
#include<bitset>
#include <climits>
#include<set>
#include<bitset>
using namespace std;
/***************************/
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long> vl;
typedef pair<int,int> pi;
typedef vector<pair<int,int>> vpi;

const long long INF = 1LL << 55;

#define itn int
#define endl '\n'
#define pb push_back
#define mp make_pair
#define ss second
#define ff first
#define dup(x,y) ((x) + (y) - 1)/(y)
#define mins(x,y) x = min(x,y)
#define maxs(x,y) x = max(x,y)
#define all(x) (x).begin(),(x).end()
#define Rep(n) for(int i = 0;i < n;i++)
#define rep(i,n) for(int i = 0;i < n;i++)
#define rrep(i,n) for(int i = n - 1;i >= 0;i--)
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() )
 
ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }
ll qp(ll a, ll b) { ll ans = 1; do { if (b & 1)ans = 1ll * ans*a; a = 1ll * a*a; } while (b >>= 1); return ans; }
ll qp(ll a, ll b, int mo) { ll ans = 1; do { if (b & 1)ans = 1ll * ans*a%mo; a = 1ll * a*a%mo; } while (b >>= 1); return ans; }
 
#define _GLIBCXX_DEBUG
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

#define INF 1000000000
#define MAX_N 100010
int n;
double x[MAX_N],y[MAX_N];
double dx[MAX_N],dy[MAX_N];
multiset<double> t;
int hol,ver;
double search_max_x();
double search_min_x();
double search_max_y();
double search_min_y();
double calc(double t);
void solve();

int main(void){
   cin >> n;
   rep(i,n){
      cin >> x[i] >> y[i];
      char s;cin >> s;
      dx[i] = dy[i] = (double)0.0;
      switch(s){
         case 'R':dx[i] = (double)1;break;
         case 'L':dx[i] = (double)-1;break;
         case 'U':dy[i] = (double)1;break;
         case 'D':dy[i] = (double)-1;break;
      }
   }
   rep(i,n){
      //if(dx[i] == 0) continue;
      if(dx[i] != dx[0]){
         hol = 1;
         break;
      }
   }
   rep(i,n){
      //if(dy[i] == 0) continue;
      if(dy[i] != dy[0]){
         ver = 1;
         break;
      }
   }
   
   solve();
   return 0;
}
void solve(){
   if(hol){
      t.insert(search_max_x());
      t.insert(search_min_x());
   }
   if(ver){
      t.insert(search_max_y());
      t.insert(search_min_y());
   }
   t.insert((double)0);
   vector<double> ans;
   for(auto i : t){
      //cout << "t : " << i << endl;
      ans.pb(calc(i));
   }
   sort(all(ans));
   cout << fixed;
   cout << setprecision(20) << ans[0] << endl;
}

double search_max_x(){
   vector<pair<double,double>> p_x(n);
   rep(i,n) p_x[i] = mp(x[i],dx[i]);
   sort(all(p_x));
   reverse(all(p_x));
   
   if(p_x[0].second == 1.00) return 0.00;
   else if(p_x[0].second == 0){
      int i = 0;
      while(p_x[i].second != 1.00 and i < n)i++;
      if(i == n) return 0.00;
      else{
         return p_x[0].ff - p_x[i].ff;
      }
   }else{
      bool check_keep = false;
      bool check_upper = false;
      double length_keep,length_upper;
      for(int i = 0;i < n;i++){
         if(p_x[i].second == 0.00 and !check_keep){
            check_keep = true;
            length_keep = i;
         }else if(p_x[i].second == 1.00 and !check_upper){
            check_upper = true;
            length_upper = i;
         }
      }
      if(!check_keep){
         return (p_x[0].ff - p_x[length_upper].ff) / (double)2;
      }else if(!check_upper){
         return (p_x[0].ff - p_x[length_keep].ff);
      }else{
         double length1 =  (p_x[0].ff - p_x[length_keep].ff);
         double length2 = (p_x[0].ff - p_x[length_upper].ff);
         if(length1*(double)2 < length2) return length1;
          else return length2/(double)2;
      }
   }
   
   
   /*{
      int i = 0;
      while(p_x[i].second = -1.00) i++;
      
      double length = p_x[0].first - p_x[i].first;
      return length / (double)2;
   }*/
}
double search_min_x(){
   vector<pair<double,double>> p_x(n);
   rep(i,n) p_x[i] = mp(x[i],(double)-1*dx[i]);
   sort(all(p_x));
   rep(i,n) p_x[i].second *= (double)-1;
   if(p_x[0].second == -1.00) return 0.00;
   else if(p_x[0].second == 0){
      int i = 0;
      while(p_x[i].second != -1.00 and i < n)i++;
      if(i == n) return 0.00;
      else{
         return p_x[i].ff - p_x[0].ff;
      }
   }else{
      bool check_keep = false;
      bool check_upper = false;
      double length_keep,length_upper;
      for(int i = 0;i < n;i++){
         if(p_x[i].second == 0.00 and !check_keep){
            check_keep = true;
            length_keep = i;
         }else if(p_x[i].second == -1.00 and !check_upper){
            check_upper = true;
            length_upper = i;
         }
      }
      if(!check_keep){
         return (double)-1*(p_x[0].ff - p_x[length_upper].ff) / (double)2;
      }else if(!check_upper){
         return (double)-1*(p_x[0].ff - p_x[length_keep].ff);
      }else{
         double length1 =  (double)-1*(p_x[0].ff - p_x[length_keep].ff);
         double length2 = (double)-1*(p_x[0].ff - p_x[length_upper].ff);
         if(length1*(double)2 < length2) return length1;
         else return length2/(double)2;
      }
   }
   
   
   /*{
      int i = 0;
      while(p_x[i].second = -1.00) i++;
      
      double length = p_x[0].first - p_x[i].first;
      return length / (double)2;
   }*/
}
double search_max_y(){
   vector<pair<double,double>> p_y(n);
   rep(i,n) p_y[i] = mp(y[i],dy[i]);
   sort(all(p_y));
   reverse(all(p_y));
   
   if(p_y[0].second == 1.00) return 0.00;
   else if(p_y[0].second == 0){
      int i = 0;
      while(p_y[i].second != 1.00 and i < n)i++;
      if(i == n) return 0.00;
      else{
         return p_y[0].ff - p_y[i].ff;
      }
   }else{
      bool check_keep = false;
      bool check_upper = false;
      double length_keep,length_upper;
      for(int i = 0;i < n;i++){
         if(p_y[i].second == 0.00 and !check_keep){
            check_keep = true;
            length_keep = i;
         }else if(p_y[i].second == 1.00 and !check_upper){
            check_upper = true;
            length_upper = i;
         }
      }
      if(!check_keep){
         return (p_y[0].ff - p_y[length_upper].ff) / (double)2;
      }else if(!check_upper){
         return (p_y[0].ff - p_y[length_keep].ff);
      }else{
         double length1 =  (p_y[0].ff - p_y[length_keep].ff);
         double length2 = (p_y[0].ff - p_y[length_upper].ff);
         if(length1*(double)2 < length2) return length1;
          else return length2/(double)2;
      }
   }
   
   
   /*{
      int i = 0;
      while(p_x[i].second = -1.00) i++;
      
      double length = p_x[0].first - p_x[i].first;
      return length / (double)2;
   }*/
}
double search_min_y(){
   vector<pair<double,double>> p_y(n);
   rep(i,n) p_y[i] = mp(y[i],(double)-1*dy[i]);
   sort(all(p_y));
   rep(i,n) p_y[i].second *= (double)-1.000000;
   //reverse(all(p_y));
   
   if(p_y[0].second == -1.00) return 0.00;
   else if(p_y[0].second == 0){
      int i = 0;
      while(p_y[i].second != -1.00 and i < n)i++;
      if(i == n) return 0.00;
      else{
         return (double)-1*(p_y[0].ff - p_y[i].ff);
      }
   }else{
      bool check_keep = false;
      bool check_upper = false;
      double length_keep,length_upper;
      for(int i = 0;i < n;i++){
         if(p_y[i].second == 0.00 and !check_keep){
            check_keep = true;
            length_keep = i;
         }else if(p_y[i].second == -1.00 and !check_upper){
            check_upper = true;
            length_upper = i;
         }
      }
      if(!check_keep){
         return (double)-1*(p_y[0].ff - p_y[length_upper].ff) / (double)2;
      }else if(!check_upper){
         return (double)-1*(p_y[0].ff - p_y[length_keep].ff);
      }else{
         double length1 =  (double)-1*(p_y[0].ff - p_y[length_keep].ff);
         double length2 = (double)-1*(p_y[0].ff - p_y[length_upper].ff);
         if(length1*(double)2 < length2) return length1;
          else return length2/(double)2;
      }
   }
   
   
   /*{
      int i = 0;
      while(p_x[i].second = -1.00) i++;
      
      double length = p_x[0].first - p_x[i].first;
      return length / (double)2;
   }*/
}

double calc(double tm){
   vector<double> px(n);
   vector<double> py(n);
   rep(i,n){
      px[i] = x[i] + tm*dx[i];
      py[i] = y[i] + tm*dy[i];
   }
   sort(all(px));
   sort(all(py));
   //cout << (px.back() - px[0]) * (py.back() - py[0]) << endl;
   return (px.back() - px[0]) * (py.back() - py[0]);
   
}

Measured memory_bytes: 4964