#ifdef DEBUG_IS_VALID
#define DEB 1 
#define _LIBCPP_DEBUG 0
#else
#define DEB 0
#define NDEBUG
#endif

#include <bits/stdc++.h>
using namespace std;

#define ALL(g) (g).begin(),(g).end()
#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i,n) REP(i,0,n)
#define RREP(i, x, n) for(int i = x; i >= n; i--)
#define rrep(i, n) RREP(i,n,0)
#define pb push_back
#pragma GCC optimize ("-O3")

using namespace std;

#define DUMPOUT cout
#define dump(...) if(DEB) DUMPOUT<<"  "<<#__VA_ARGS__<<" :["<<__LINE__<<":"<<__FUNCTION__<<"]"<<endl<<"    "; if(DEB) dump_func(__VA_ARGS__)
template<typename T1,typename T2>ostream& operator << (ostream& os, pair<T1,T2> p){cout << "(" << p.first << ", " << p.second << ")"; return os;}
template<typename T>ostream& operator << (ostream& os, vector<T>& vec) { os << "{"; for (int i = 0; i<vec.size(); i++) os << vec[i] << (i + 1 == vec.size() ? "" : ", "); os << "}"; return os; }
template<typename T>ostream& operator << (ostream& os, set<T>& st){cout << "{"; for(auto itr = st.begin(); itr != st.end(); itr++) cout << *itr << (next(itr)!=st.end() ? ", " : ""); cout << "}"; return os;}
template<typename T1,typename T2>ostream& operator << (ostream& os, map<T1,T2> mp){cout << "{"; for(auto itr = mp.begin(); itr != mp.end(); itr++) cout << "(" << (itr->first) << ", " << (itr->second) << ")" << (next(itr)!=mp.end() ? "," : ""); cout << "}"; return os; }

void dump_func(){DUMPOUT << endl;}
template <class Head, class... Tail>void dump_func(Head&& head, Tail&&... tail){ DUMPOUT << head; if (sizeof...(Tail) == 0) { DUMPOUT << " "; } else { DUMPOUT << ", "; } dump_func(std::move(tail)...);}
template<class T> inline bool chmax(T& a,T const& b){if(a>=b) return false; a=b; return true;}
template<class T> inline bool chmin(T& a,T const& b){if(a<=b) return false; a=b; return true;}

using ll = long long;
using P = pair<int,int>;
using Pl = pair<ll,ll>;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vp = vector<Pl>;
using vvp = vector<vp>;

const int INF = 1<<29;
const long long LINF=1LL<<59;

using vd = vector<double>;
const double inf = 1e10;
struct D{
  vd left, right; // 速度 0,1,2
  D():left(3,inf),right(3,-inf){}
  void add(int i, double p){
    chmin(left[i],p);
    chmax(right[i],p);
  }
  double get(double t){
    double mmax = -inf, mmin = inf;
    rep(i,3) chmin(mmin, left[i]+t*double(i));
    rep(i,3) chmax(mmax, right[i]+t*double(i));
    return mmax - mmin;
  }
  vd enmr(){
    vd res;
    rep(i,2) REP(j,i+1,3){
      double t = (left[i]-left[j])/double(j-i); // left[i]+i*t==left[j]+i*t
      if(t<0) continue;
      res.pb(t);
    } 
    rep(i,2) REP(j,i+1,3){
      double t = (right[i]-right[j])/double(j-i); // right[i]+i*t==right[j]+i*t
      if(t<0) continue;
      res.pb(t);
    }
    return res;
  }
};

void solve(long long N, std::vector<long long> x, std::vector<long long> y, std::vector<std::string> d){
  D dx,dy;
  rep(i,N){
    char c = d[i][0];
    if(c=='R') dx.add(2,x[i]), dy.add(1,y[i]);
    if(c=='L') dx.add(0,x[i]), dy.add(1,y[i]);
    if(c=='U') dx.add(1,x[i]), dy.add(2,y[i]);
    if(c=='D') dx.add(1,x[i]), dy.add(0,y[i]);
  }
  vd cand; // 端点候補
  cand.pb(0); cand.pb(inf);
  {
    auto vec = dx.enmr();
    cand.insert(cand.end(),vec.begin(),vec.end());
  }
  {
    auto vec = dy.enmr();
    cand.insert(cand.end(),vec.begin(),vec.end());
  }
  sort(ALL(cand));
  double ans = 1e18;
  for(auto t:cand){
    double val = dx.get(t) * dy.get(t);
    chmin(ans, val);
  }
  cout << setprecision(10);
  cout << ans << endl;
}

int main(){
  long long N;
  scanf("%lld",&N);
  std::vector<long long> x(N);
  std::vector<long long> y(N);
  std::vector<std::string> d(N);
  for(int i = 0 ; i < N ; i++){
    scanf("%lld",&x[i]);
    scanf("%lld",&y[i]);
    std::cin >> d[i];
  }
  solve(N, std::move(x), std::move(y), std::move(d));
  return 0;
}


Measured memory_bytes: 7296