#include <iostream>
#include <vector>
#include <cstdio>
#include <sstream>
#include <map>
#include <string>
#include <algorithm>
#include <queue>
#include <cmath>
#include <functional>
#include <set>
#include <ctime>
#include <random>
#include <chrono>
#include <cassert>
#include <tuple>
#include <utility>
using namespace std;

namespace {
  using Integer = long long; //__int128;
  template<class T, class S> istream& operator >> (istream& is, pair<T,S>& p){return is >> p.first >> p.second;}
  template<class T> istream& operator >> (istream& is, vector<T>& vec){for(T& val: vec) is >> val; return is;}
  template<class T> istream& operator ,  (istream& is, T& val){ return is >> val;}
  template<class T, class S> ostream& operator << (ostream& os, const pair<T,S>& p){return os << p.first << " " << p.second;}
  template<class T> ostream& operator << (ostream& os, const vector<T>& vec){for(size_t i=0; i<vec.size(); i++) os << vec[i] << (i==vec.size()-1?"":" "); return os;}
  template<class T> ostream& operator ,  (ostream& os, const T& val){ return os << " " << val;}

  template<class H> void print(const H& head){ cout << head; }
  template<class H, class ... T> void print(const H& head, const T& ... tail){ cout << head << " "; print(tail...); }
  template<class ... T> void println(const T& ... values){ print(values...); cout << endl; }

  template<class H> void eprint(const H& head){ cerr << head; }
  template<class H, class ... T> void eprint(const H& head, const T& ... tail){ cerr << head << " "; eprint(tail...); }
  template<class ... T> void eprintln(const T& ... values){ eprint(values...); cerr << endl; }

  class range{ Integer start_, end_, step_; public: struct range_iterator{ Integer val, step_; range_iterator(Integer v, Integer step) : val(v), step_(step) {} Integer operator * (){return val;} void operator ++ (){val += step_;} bool operator != (range_iterator& x){return step_ > 0 ? val < x.val : val > x.val;} }; range(Integer len) : start_(0), end_(len), step_(1) {} range(Integer start, Integer end) : start_(start), end_(end), step_(1) {} range(Integer start, Integer end, Integer step) : start_(start), end_(end), step_(step) {} range_iterator begin(){ return range_iterator(start_, step_); } range_iterator   end(){ return range_iterator(  end_, step_); } };

  inline string operator "" _s (const char* str, size_t size){ return move(string(str)); }
  constexpr Integer my_pow(Integer x, Integer k, Integer z=1){return k==0 ? z : k==1 ? z*x : (k&1) ? my_pow(x*x,k>>1,z*x) : my_pow(x*x,k>>1,z);}
  constexpr Integer my_pow_mod(Integer x, Integer k, Integer M, Integer z=1){return k==0 ? z%M : k==1 ? z*x%M : (k&1) ? my_pow_mod(x*x%M,k>>1,M,z*x%M) : my_pow_mod(x*x%M,k>>1,M,z);}
  constexpr unsigned long long operator "" _ten (unsigned long long value){ return my_pow(10,value); }

  inline int k_bit(Integer x, int k){return (x>>k)&1;} //0-indexed

  mt19937 mt(chrono::duration_cast<chrono::nanoseconds>(chrono::steady_clock::now().time_since_epoch()).count());

  template<class T> string join(const vector<T>& v, const string& sep){ stringstream ss; for(size_t i=0; i<v.size(); i++){ if(i>0) ss << sep; ss << v[i]; } return ss.str(); }

  inline string operator * (string s, int k){ string ret; while(k){ if(k&1) ret += s; s += s; k >>= 1; } return ret; }
}
constexpr long long mod = 9_ten + 7;


#define EPS 1e-7
//typedef long double Double;
using Double = long double;

class xy{
public:
  Double x;
  Double y;
  xy() : x(0), y(0) {}
  xy(Double xx, Double yy) : x(xx), y(yy) {}
  xy(const xy& v) : x(v.x), y(v.y){}

  xy& operator = (const xy& v){
    x = v.x;
    y = v.y;
    return *this;
  }
  xy operator + (const xy& v) const{return xy(this->x+v.x, this->y+v.y);}
  xy operator - (const xy& v) const{return xy(this->x-v.x, this->y-v.y);}
  xy operator * (const Double& k) const{return xy(this->x * k, this->y * k);}
  
  void operator += (const xy& v){x+=v.x;  y+=v.y;}
  void operator -= (const xy& v){x-=v.x;  y-=v.y;}
  void operator *= (const Double& k){x*=k;  y*=k;}

  bool operator < (const xy& v) const{
    if(x!=v.x) return x < v.x;
    return y < v.y;
  }
  bool operator > (const xy& v) const{
    if(x!=v.x) return x > v.x;
    return y > v.y;
  }
  bool operator == (const xy& v) const{
    return fabs(x-v.x) + fabs(y-v.y) < EPS;
  }
};
xy operator * (const Double& k, const xy& v){return v*k;}

//u corss v
Double cross(const xy& u, const xy& v){
  return u.x*v.y - u.y*v.x;
}

//u dot v
Double dot(const xy& u, const xy& v){
  return u.x*v.x + u.y*v.y;
}

//distance between two points
Double dist_p_p(const xy& a, const xy& b){
  return sqrt( fabs(dot(a-b, a-b)) );
}

//distance between a point and a line ***segment***
Double dist_p_ls(const xy &p, const xy &s1, const xy &s2){
  xy vl = s2 - s1;
  xy vp = p - s1;
  Double tmp = dot(vl,vp);
  if(-EPS<=tmp && tmp <= dot(vl,vl)+EPS){
    return fabs( cross(vl, vp) / sqrt( dot(vl, vl) ) );
  }else{
    return min(dist_p_p(p,s1), dist_p_p(p,s2));
  }
}

//distance between a point and a line
Double dist_p_l(const xy &p, const xy &s1, const xy &s2){
  xy vl = s2 - s1;
  xy vp = p - s1;
  return fabs( cross(vl, vp) / sqrt( dot(vl, vl) ) );
}


int ccw(xy p1, xy p2, xy p3){
  p2 -= p1;
  p3 -= p1;
  Double c = cross(p2,p3);
  if( c > EPS /* c > 0 */) return +1;       //counter-clockwise
  if( c < -EPS /* c < 0 */) return -1;      //clock-wise
  if( dot(p2,p3) < -EPS) return +2;       //out of segment : p3-p1-p2
  if( dot(p3,p3) - dot(p2,p2) > EPS) return -2; //out of segment : p1-p2-p3
  return 0;                     //on the segment : p1-p3-p2
}

//are two segment p1-p2 , p3-p4 parallel?
bool is_parallel(xy p1, xy p2, xy p3, xy p4){
  return abs(ccw(p1,p2, p3))!=1 && abs(ccw(p1,p2, p4))!=1;
}

//intersect
//segment p1-p2, p3-p4
bool inter_ss(xy p1, xy p2, xy p3, xy p4){
  int ret1 = ccw(p1,p2, p3) * ccw(p1,p2, p4);
  int ret2 = ccw(p3,p4, p1) * ccw(p3,p4, p2);
  return ret1 <= 0 && ret2 <= 0;
}

bool inter_ss(const pair<xy,xy>& l1, const pair<xy,xy>& l2){
  return inter_ss(l1.first, l1.second, l2.first, l2.second);
}

//return crossing point l1 and l2 without checking
xy inter_point(const pair<xy,xy>& l1, const pair<xy,xy>& l2){
  Double a = cross(l2.second - l1.first, l2.second - l2.first);
  //Double b = cross(l1.second - l1.first, l2.second - l1.first);
  Double c = cross(l1.second - l1.first, l2.second - l2.first);
  Double lam = a/c;
  return l1.first + (l1.second - l1.first)*lam;
}

vector<double> get_t(vector<pair<int,int>>& l){
  vector<double> res = {0};
  for(int i=0; i<l.size(); i++){
    pair<xy, xy> l1 = {xy(0, l[i].second), xy(1e10, 1e10*l[i].first+l[i].second)};
    for(int j=i+1; j<l.size(); j++){
      pair<xy, xy> l2 = {xy(0, l[j].second), xy(1e10, 1e10*l[j].first+l[j].second)};
      if(inter_ss(l1, l2) == false) continue;
      auto c = inter_point(l1, l2);
      if(c.x < 0.0) continue;
      res.push_back(c.x);
    }
  }
  sort(res.begin(), res.end());
  return res;
}

double get_dist(vector<pair<int,int>>& h, vector<pair<int,int>>& l, double t){
  vector<double> res;
  double hi = -1e50;
  double lo =  1e50;
  for(int i=0; i<h.size(); i++){
    double a = h[i].first * t + h[i].second;
    hi = max(hi, a);
  }
  for(int j=0; j<l.size(); j++){
    double b = l[j].first * t + l[j].second;
    lo = min(lo, b);
  }
  double d = fabs(hi - lo);
  
  return d;
}

int main(){
  int n;
  cin >> n;

  vector<tuple<long long,long long,string>> p(n);
  for(int i=0; i<n; i++){
    long long x,y;
    string s;
    cin >> x,y,s;
    p[i] = make_tuple(x,y,s);
  }

  vector<pair<int,int>> y_min = [&](){
    vector<int> idx(n);
    map<int, int> m;
    for(int i=0; i<n; i++){
      long long x, y;
      string s;
      tie(ignore,y,s) = p[i];

      int k = 0;
      if(s == "U"){
        k = 1;
      }else if(s == "D"){
        k = -1;
      }

      if(m.count(k)){
        m[k] = min<int>(m[k], y);
      }else{
        m[k] = y;
      }
    }

    vector<pair<int,int>> l;
    for(auto& w: m){
      l.push_back(w);
    }
    reverse(l.begin(), l.end());

    return l;
  }();

  vector<pair<int,int>> y_max = [&](){
    vector<int> idx(n);
    map<int, int> m;
    for(int i=0; i<n; i++){
      long long x, y;
      string s;
      tie(ignore,y,s) = p[i];

      int k = 0;
      if(s == "U"){
        k = 1;
      }else if(s == "D"){
        k = -1;
      }

      if(m.count(k)){
        m[k] = max<int>(m[k], y);
      }else{
        m[k] = y;
      }
    }

    vector<pair<int,int>> l;
    for(auto& w: m){
      l.push_back(w);
    }
    return l;
  }();

  vector<pair<int,int>> x_min = [&](){
    vector<int> idx(n);
    map<int, int> m;
    for(int i=0; i<n; i++){
      long long x, y;
      string s;
      tie(x,ignore,s) = p[i];

      int k = 0;
      if(s == "R"){
        k = 1;
      }else if(s == "L"){
        k = -1;
      }

      if(m.count(k)){
        m[k] = min<int>(m[k], x);
      }else{
        m[k] = x;
      }
    }

    vector<pair<int,int>> l;
    for(auto& w: m){
      l.push_back(w);
    }
    reverse(l.begin(), l.end());

    return l;
  }();

  vector<pair<int,int>> x_max = [&](){
    vector<int> idx(n);
    map<int, int> m;
    for(int i=0; i<n; i++){
      long long x, y;
      string s;
      tie(x,ignore,s) = p[i];

      int k = 0;
      if(s == "R"){
        k = 1;
      }else if(s == "L"){
        k = -1;
      }

      if(m.count(k)){
        m[k] = max<int>(m[k], x);
      }else{
        m[k] = x;
      }
    }

    vector<pair<int,int>> l;
    for(auto& w: m){
      l.push_back(w);
    }
    return l;
  }();


  auto ty_min = get_t(y_min);
  auto ty_max = get_t(y_max);
  auto tx_min = get_t(x_min);
  auto tx_max = get_t(x_max);

  vector<double> tt;
  tt.insert(tt.end(), ty_min.begin(), ty_min.end());
  tt.insert(tt.end(), ty_max.begin(), ty_max.end());
  tt.insert(tt.end(), tx_min.begin(), tx_min.end());
  tt.insert(tt.end(), tx_max.begin(), tx_max.end());
  sort(tt.begin(), tt.end());

  double ans = 1e50;
  for(auto t: tt){
    if(t < 0.0) continue;
    double dy = get_dist(y_max, y_min, t);
    double dx = get_dist(x_max, x_min, t);
    ans = min(ans, dy*dx);
  }

  printf("%.16lf\n", ans);

  return 0;
}


Measured memory_bytes: 7680