#include<iostream>
#include<cmath>
#include<cstdlib>
#include<string>
#include<cstring>
#include<algorithm>
#include<vector>
#include<map>
#include<iomanip>

using namespace std;

typedef long long ll;

typedef std::pair<int, int> ipair;
bool lessPair(const ipair& l, const ipair& r){return l.second < r.second;}
bool morePair(const ipair& l, const ipair& r){return l.second > r.second;}

template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

const ll MOD = 1e9 + 7;
const long long INF = 1LL<<60;
void add(long long &a, long long b) { a += b; if (a >= MOD) a -= MOD; }
void sub(long long &a, long long b) { a -= b; if (a < 0) a += MOD; }
void mul(long long &a, long long b) { a *= b; a %= MOD; }
ll llmin(ll a, ll b) { if (a < b) return a; else return b; }
ll llmax(ll a, ll b) { if (a < b) return b; else return a; }
ll llabs(ll a) { if (a >= 0) return a; else return - a; }

int N;
vector<double> x, y;
vector<char> d;
double area(double t) {
    double xmi = INF, xma = -INF, ymi = INF, yma = -INF;
    for (int i = 0; i < N; ++i) {
        double cx, cy;
        if (d[i] == 'L') cx = x[i] - t, cy = y[i];
        else if (d[i] == 'R') cx = x[i] + t, cy = y[i];
        else if (d[i] == 'U') cx = x[i], cy = y[i] + t;
        else cx = x[i], cy = y[i] - t;
        chmin(xmi, cx);
        chmax(xma, cx);
        chmin(ymi, cy);
        chmax(yma, cy);
    }
    return (xma - xmi) * (yma - ymi);
}

int main() {
   cin >> N;
   x.resize(N);
   y.resize(N);
   d.resize(N);
   for (int i = 0; i < N; i++) cin >> x[i] >> y[i] >> d[i];

   vector<double> times;
   times.push_back(0);

   double plus, minus, border;

   plus = INF;
   minus = INF;
   border = INF;
   for (int i = 0; i < N; i++) {
      if (d[i] == 'L') chmin(plus, x[i]);
      else if (d[i] == 'R') chmin(minus, x[i]);
      else chmin(border, x[i]);
   }
   if (plus != INF && border != INF) times.push_back(abs(plus - border));
   if (minus != INF && border != INF) times.push_back(abs(minus - border));
   if (plus != INF && minus != INF) times.push_back(abs(plus - minus) / 2.);
   
   plus = -INF;
   minus = -INF;
   border = -INF;
   for (int i = 0; i < N; i++) {
      if (d[i] == 'R') chmax(plus, x[i]);
      else if (d[i] == 'L') chmax(minus, x[i]);
      else chmax(border, x[i]);
   }
   if (plus != -INF && border != -INF) times.push_back(abs(plus - border));
   if (minus != -INF && border != -INF) times.push_back(abs(minus - border));
   if (plus != -INF && minus != -INF) times.push_back(abs(plus - minus) / 2.);

   plus = INF;
   minus = INF;
   border = INF;
   for (int i = 0; i < N; i++) {
      if (d[i] == 'D') chmin(plus, y[i]);
      else if (d[i] == 'U') chmin(minus, y[i]);
      else chmin(border, y[i]);
   }
   if (plus != INF && border != INF) times.push_back(abs(plus - border));
   if (minus != INF && border != INF) times.push_back(abs(minus - border));
   if (plus != INF && minus != INF) times.push_back(abs(plus - minus) / 2.);

   plus = -INF;
   minus = -INF;
   border = -INF;
   for (int i = 0; i < N; i++) {
      if (d[i] == 'U') chmax(plus, y[i]);
      else if (d[i] == 'D') chmax(minus, y[i]);
      else chmax(border, y[i]);
   }
   if (plus != -INF && border != -INF) times.push_back(abs(plus - border));
   if (minus != -INF && border != -INF) times.push_back(abs(minus - border));
   if (plus != -INF && minus != -INF) times.push_back(abs(plus - minus) / 2.);

   double ans = INF;
   for (int i = 0; i < (int)times.size(); i++) chmin(ans, area(times[i]));

   cout << fixed << setprecision(10) << ans << endl;
   return 0;
}


Measured memory_bytes: 1920