#include <bits/stdc++.h>
using namespace std;
#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define FOR(it,c) for(__typeof((c).begin()) it=(c).begin(); it!=(c).end(); ++it)
#define ALLOF(c) (c).begin(), (c).end()
typedef long long ll;
typedef unsigned long long ull;

static const int INF = 1000000000;

double solve(double t, double xmax, double xmin, double ymax, double ymin, map<string,vector<int>>& vv){
  vector<pair<int,int>> v;
  {
    vector<int> w = vv["D"];
    rep(i,w.size()){
      ymin = min(ymin, w[i]-t);
      ymax = max(ymax, w[i]-t);
    }
  }
  {
    vector<int> w = vv["U"];
    rep(i,w.size()){
      ymin = min(ymin, w[i]+t);
      ymax = max(ymax, w[i]+t);
    }
  }
  {
    vector<int> w = vv["L"];
    rep(i,w.size()){
      xmin = min(xmin, w[i]-t);
      xmax = max(xmax, w[i]-t);
    }
  }
  {
    vector<int> w = vv["R"];
    rep(i,w.size()){
      xmin = min(xmin, w[i]+t);
      xmax = max(xmax, w[i]+t);
    }
  }

  double diffx = xmax - xmin;
  double diffy = ymax - ymin;
  //cout << t << " " << diffx << " " << diffy << " " << diffx * diffy << endl;
  return diffx * diffy;
}


int main(){
  int N;
  cin >> N;
  map<string,vector<pair<int,int>>> v;
  rep(i,N){
    int x, y;
    string d;
    cin >> x >> y >> d;
    v[d].emplace_back(x,y);
  }

  int c_y_max = -INF;
  int c_y_min = INF;
  {
    vector<pair<int,int>> w = v["L"];
    rep(i,w.size()){
      c_y_max = max(c_y_max, w[i].second);
      c_y_min = min(c_y_min, w[i].second);
    }
  }
  {
    vector<pair<int,int>> w = v["R"];
    rep(i,w.size()){
      c_y_max = max(c_y_max, w[i].second);
      c_y_min = min(c_y_min, w[i].second);
    }
  }
  int c_x_max = -INF;
  int c_x_min = INF;
  {
    vector<pair<int,int>> w = v["U"];
    rep(i,w.size()){
      c_x_max = max(c_x_max, w[i].first);
      c_x_min = min(c_x_min, w[i].first);
    }
  }
  {
    vector<pair<int,int>> w = v["D"];
    rep(i,w.size()){
      c_x_max = max(c_x_max, w[i].first);
      c_x_min = min(c_x_min, w[i].first);
    }
  }

  map<string,vector<int>> vv;
  {
    vector<pair<int,int>> w = v["U"];
    int min_y = INF, max_y = -INF;
    rep(i,w.size()){
      max_y = max(max_y, w[i].second);
      min_y = min(min_y, w[i].second);
    }
    if(min_y!=INF) vv["U"].push_back(min_y);
    if(max_y!=-INF) vv["U"].push_back(max_y);
  }
  {
    vector<pair<int,int>> w = v["D"];
    int min_y = INF, max_y = -INF;
    rep(i,w.size()){
      max_y = max(max_y, w[i].second);
      min_y = min(min_y, w[i].second);
    }
    if(min_y!=INF) vv["D"].push_back(min_y);
    if(max_y!=-INF) vv["D"].push_back(max_y);
  }
  {
    vector<pair<int,int>> w = v["L"];
    int min_x = INF, max_x = -INF;
    rep(i,w.size()){
      max_x = max(max_x, w[i].first);
      min_x = min(min_x, w[i].first);
    }
    if(min_x!=INF) vv["L"].push_back(min_x);
    if(max_x!=-INF) vv["L"].push_back(max_x);
  }
  {
    vector<pair<int,int>> w = v["R"];
    int min_x = INF, max_x = -INF;
    rep(i,w.size()){
      max_x = max(max_x, w[i].first);
      min_x = min(min_x, w[i].first);
    }
    if(min_x!=INF) vv["R"].push_back(min_x);
    if(max_x!=-INF) vv["R"].push_back(max_x);
  }
/*
  rep(i,vv["L"].size()){
    cout << " " << vv["L"][i];
  }
  cout << endl;
  rep(i,vv["R"].size()){
    cout << " " << vv["R"][i];
  }
  cout << endl;
  */

  set<double> cand_t;
  cand_t.insert(0);

  {
    vector<pair<int,int>> w = v["U"];
    rep(i,w.size()){
      if(c_y_max > w[i].second){
        cand_t.insert(c_y_max - w[i].second);
      }
      if(c_y_min > w[i].second){
        cand_t.insert(c_y_min - w[i].second);
      }
    }
  }
  {
    vector<pair<int,int>> w = v["D"];
    rep(i,w.size()){
      if(c_y_min < w[i].second){
        cand_t.insert(w[i].second - c_y_min);
      }
      if(c_y_max < w[i].second){
        cand_t.insert(w[i].second - c_y_max);
      }
    }
  }
  {
    vector<pair<int,int>> w = v["R"];
    rep(i,w.size()){
      if(c_x_max > w[i].first){
        cand_t.insert(c_x_max - w[i].first);
      }
      if(c_x_min > w[i].first){
        cand_t.insert(c_x_min - w[i].first);
      }
    }
  }
  {
    vector<pair<int,int>> w = v["L"];
    rep(i,w.size()){
      if(c_x_min < w[i].first){
        cand_t.insert(w[i].first - c_x_min);
      }
      if(c_x_max < w[i].first){
        cand_t.insert(w[i].first - c_x_max);
      }
    }
  }
  if(vv["D"].size() > 0 && vv["U"].size() > 0) {
    rep(i,vv["D"].size()){
      rep(j,vv["U"].size()){
        int yy = vv["D"][i] - vv["U"][j];
        if(yy > 0){
          cand_t.insert(yy/2.0);
        }
      }
    }
  }
  if(vv["L"].size() > 0 && vv["R"].size() > 0) {
    rep(i,vv["L"].size()){
      rep(j,vv["R"].size()){
        int xx = vv["L"][i] - vv["R"][j];
        if(xx > 0){
          cand_t.insert(xx/2.0);
        }
      }
    }
  }

  double ret = 1e100;
  FOR(it,cand_t){
    ret = min(ret, solve(*it, 
                         c_x_max, c_x_min,
                         c_y_max, c_y_min,
                         vv));
  }

  printf("%.12lf\n", ret);
  
  return 0;
}

Measured memory_bytes: 5600