#include<bits/stdc++.h>
using namespace std;
inline void rd(int &x){
  int k, m=0;
  x=0;
  for(;;){
    k = getchar_unlocked();
    if(k=='-'){
      m=1;
      break;
    }
    if('0'<=k&&k<='9'){
      x=k-'0';
      break;
    }
  }
  for(;;){
    k = getchar_unlocked();
    if(k<'0'||k>'9'){
      break;
    }
    x=x*10+k-'0';
  }
  if(m){
    x=-x;
  }
}
inline int rd(char c[]){
  int i, sz=0;
  for(;;){
    i = getchar_unlocked();
    if(i!=' '&&i!='\n'&&i!='\r'&&i!='\t'&&i!=EOF){
      break;
    }
  }
  c[sz++] = i;
  for(;;){
    i = getchar_unlocked();
    if(i==' '||i=='\n'||i=='\r'||i=='\t'||i==EOF){
      break;
    }
    c[sz++] = i;
  }
  c[sz]='\0';
  return sz;
}
inline void wt_L(char a){
  putchar_unlocked(a);
}
inline void wt_L(double x){
  printf("%.15f",x);
}
template<class S, class T> inline S chmin(S &a, T b){
  if(a>b){
    a=b;
  }
  return a;
}
template<class S, class T> inline S chmax(S &a, T b){
  if(a<b){
    a=b;
  }
  return a;
}
int N;
int x1a;
int x1b;
int x2a;
int x2b;
int x3a;
int x3b;
int y1a;
int y1b;
int y2a;
int y2b;
int y3a;
int y3b;
char buf[10];
double evl(double t){
  double xa, xb, ya, yb;
  if(t < 0){
    return 1e150;
  }
  xa = ya = 1e300;
  xb = yb = -1e300;
  if(x1a != 1073709056){
    chmin(xa, x1a - t);
    chmax(xb, x1b - t);
  }
  if(x2a != 1073709056){
    chmin(xa, x2a);
    chmax(xb, x2b);
  }
  if(x3a != 1073709056){
    chmin(xa, x3a + t);
    chmax(xb, x3b + t);
  }
  if(y1a != 1073709056){
    chmin(ya, y1a - t);
    chmax(yb, y1b - t);
  }
  if(y2a != 1073709056){
    chmin(ya, y2a);
    chmax(yb, y2b);
  }
  if(y3a != 1073709056){
    chmin(ya, y3a + t);
    chmax(yb, y3b + t);
  }
  return (xb-xa) * (yb-ya);
}
int main(){
  double res;
  int Lj4PdHRW, i, j, k;
  x1a = x2a = x3a = y1a = y2a = y3a = 1073709056;
  x1b = x2b = x3b = y1b = y2b = y3b = -1073709056;
  rd(N);
  for(Lj4PdHRW=0;Lj4PdHRW<N;Lj4PdHRW++){
    rd(i);
    rd(j);
    rd(buf);
    if(buf[0]=='R'){
      chmin(x3a, i);
      chmax(x3b, i);
      chmin(y2a, j);
      chmax(y2b, j);
    }
    if(buf[0]=='L'){
      chmin(x1a, i);
      chmax(x1b, i);
      chmin(y2a, j);
      chmax(y2b, j);
    }
    if(buf[0]=='U'){
      chmin(x2a, i);
      chmax(x2b, i);
      chmin(y3a, j);
      chmax(y3b, j);
    }
    if(buf[0]=='D'){
      chmin(x2a, i);
      chmax(x2b, i);
      chmin(y1a, j);
      chmax(y1b, j);
    }
  }
  res = evl(0);
  if(x1a!=1073709056 && x2a!=1073709056){
    chmin(res, evl(x1a-x2a));
    chmin(res, evl(x1b-x2b));
  }
  if(x2a!=1073709056 && x3a!=1073709056){
    chmin(res, evl(x2a-x3a));
    chmin(res, evl(x2b-x3b));
  }
  if(x1a!=1073709056 && x3a!=1073709056){
    chmin(res, evl( (x1a-x3a) / 2.0 ));
    chmin(res, evl( (x1a-x3b) / 2.0 ));
    chmin(res, evl( (x1b-x3a) / 2.0 ));
    chmin(res, evl( (x1b-x3b) / 2.0 ));
  }
  if(y1a!=1073709056 && y2a!=1073709056){
    chmin(res, evl(y1a-y2a));
    chmin(res, evl(y1b-y2b));
  }
  if(y2a!=1073709056 && y3a!=1073709056){
    chmin(res, evl(y2a-y3a));
    chmin(res, evl(y2b-y3b));
  }
  if(y1a!=1073709056 && y3a!=1073709056){
    chmin(res, evl( (y1a-y3a) / 2.0 ));
    chmin(res, evl( (y1a-y3b) / 2.0 ));
    chmin(res, evl( (y1b-y3a) / 2.0 ));
    chmin(res, evl( (y1b-y3b) / 2.0 ));
  }
  wt_L(res);
  wt_L('\n');
  return 0;
}
// cLay varsion 20190706-1

// --- original code ---
// int N;
// int x1a, x1b, x2a, x2b, x3a, x3b;
// int y1a, y1b, y2a, y2b, y3a, y3b;
// char buf[10];
// 
// double evl(double t){
//   double xa, xb, ya, yb;
// 
//   if(t < 0) return double_inf;
// 
//   xa = ya = 1e300;
//   xb = yb = -1e300;
// 
//   if(x1a != int_inf) xa <?= x1a - t, xb >?= x1b - t;
//   if(x2a != int_inf) xa <?= x2a,     xb >?= x2b;
//   if(x3a != int_inf) xa <?= x3a + t, xb >?= x3b + t;
//   if(y1a != int_inf) ya <?= y1a - t, yb >?= y1b - t;
//   if(y2a != int_inf) ya <?= y2a,     yb >?= y2b;
//   if(y3a != int_inf) ya <?= y3a + t, yb >?= y3b + t;
// 
//   return (xb-xa) * (yb-ya);
// }
// 
// {
//   int i, j, k;
//   double res;
// 
//   x1a = x2a = x3a = y1a = y2a = y3a = int_inf;
//   x1b = x2b = x3b = y1b = y2b = y3b = -int_inf;
// 
//   rd(N);
//   rep(N){
//     rd(i,j,buf);
//     if(buf[0]=='R') x3a <?= i, x3b >?= i, y2a <?= j, y2b >?= j;
//     if(buf[0]=='L') x1a <?= i, x1b >?= i, y2a <?= j, y2b >?= j;
//     if(buf[0]=='U') x2a <?= i, x2b >?= i, y3a <?= j, y3b >?= j;
//     if(buf[0]=='D') x2a <?= i, x2b >?= i, y1a <?= j, y1b >?= j;
//   }
//   res = evl(0);
// 
//   if(x1a!=int_inf && x2a!=int_inf){
//     res <?= evl(x1a-x2a);
//     res <?= evl(x1b-x2b);
//   }
//   if(x2a!=int_inf && x3a!=int_inf){
//     res <?= evl(x2a-x3a);
//     res <?= evl(x2b-x3b);
//   }
//   if(x1a!=int_inf && x3a!=int_inf){
//     res <?= evl( (x1a-x3a) / 2.0 );
//     res <?= evl( (x1a-x3b) / 2.0 );
//     res <?= evl( (x1b-x3a) / 2.0 );
//     res <?= evl( (x1b-x3b) / 2.0 );
//   }
//   if(y1a!=int_inf && y2a!=int_inf){
//     res <?= evl(y1a-y2a);
//     res <?= evl(y1b-y2b);
//   }
//   if(y2a!=int_inf && y3a!=int_inf){
//     res <?= evl(y2a-y3a);
//     res <?= evl(y2b-y3b);
//   }
//   if(y1a!=int_inf && y3a!=int_inf){
//     res <?= evl( (y1a-y3a) / 2.0 );
//     res <?= evl( (y1a-y3b) / 2.0 );
//     res <?= evl( (y1b-y3a) / 2.0 );
//     res <?= evl( (y1b-y3b) / 2.0 );
//   }
// 
//   wt(res);
// }


Measured memory_bytes: 256