#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <cmath>
#include <deque>
#include <iterator>
#include <map>
#include <queue>
#include <string>
#include <tuple>
#include <utility>
#include <limits>
#include <iomanip>
using namespace std;

using ll=long long;
template<class T> using V = vector<T>;
template<class T, class U> using P = pair<T, U>;
using vll = V<ll>;
using vvll = V<vll>;
#define rep(i, k, n) for (ll i=k; i<(ll)n; ++i)
#define REP(i, n) rep(i, 0, n)
template<class T> inline bool chmax(T& a, T b) {if (a<b) {a=b; return true;} return false;}
template<class T> inline bool chmin(T& a, T b) {if (a>b) {a=b; return true;} return false;}

const ll MOD = 1000000007;
const ll HIGHINF = (ll)1e18;

ll n;
V<double> x, y;
V<char> d;

double area(double t) {
  double xmi = HIGHINF, xma = -HIGHINF, ymi = HIGHINF, yma = -HIGHINF;
  REP(i, n) {
    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);
}

double solve() {
  V<double> alt;  // 変化するタイミングを入れる
  alt.push_back(0);  // 最初もありなので

  { // 左が変わるタイミング?
    double mi1 = HIGHINF;  // L
    double mi2 = HIGHINF;  // R
    double mi3 = HIGHINF;  // UD
    REP(i, n) {
      if (d[i] == 'L') chmin(mi1, x[i]);
      else if (d[i] == 'R') chmin(mi2, x[i]);
      else chmin(mi3, x[i]);
    }
    if (mi1 < HIGHINF && mi2 < HIGHINF) alt.push_back(abs(mi1-mi2) / 2);
    if (mi1 < HIGHINF && mi3 < HIGHINF) alt.push_back(abs(mi1-mi3));
    if (mi2 < HIGHINF && mi3 < HIGHINF) alt.push_back(abs(mi2-mi3));
  }
  { // 右が変わるタイミング?
    double ma1 = -HIGHINF;  // L
    double ma2 = -HIGHINF;  // R
    double ma3 = -HIGHINF;  // UD
    REP(i, n) {
      if (d[i] == 'L') chmax(ma1, x[i]);
      else if (d[i] == 'R') chmax(ma2, x[i]);
      else chmax(ma3, x[i]);
    }
    if (ma1 > -HIGHINF && ma2 > -HIGHINF) alt.push_back(abs(ma1-ma2) / 2);
    if (ma1 > -HIGHINF && ma3 > -HIGHINF) alt.push_back(abs(ma1-ma3));
    if (ma2 > -HIGHINF && ma3 > -HIGHINF) alt.push_back(abs(ma2-ma3));
  }
  { // 下が変わるタイミング?
    double mi1 = HIGHINF;  // D
    double mi2 = HIGHINF;  // U
    double mi3 = HIGHINF;  // LR
    REP(i, n) {
      if (d[i] == 'D') chmin(mi1, y[i]);
      else if (d[i] == 'U') chmin(mi2, y[i]);
      else chmin(mi3, y[i]);
    }
    if (mi1 < HIGHINF && mi2 < HIGHINF) alt.push_back(abs(mi1-mi2) / 2);
    if (mi1 < HIGHINF && mi3 < HIGHINF) alt.push_back(abs(mi1-mi3));
    if (mi2 < HIGHINF && mi3 < HIGHINF) alt.push_back(abs(mi2-mi3));
  }
  { // 上が変わるタイミング?
    double ma1 = -HIGHINF;  // L
    double ma2 = -HIGHINF;  // R
    double ma3 = -HIGHINF;  // UD
    REP(i, n) {
      if (d[i] == 'D') chmax(ma1, y[i]);
      else if (d[i] == 'U') chmax(ma2, y[i]);
      else chmax(ma3, y[i]);
    }
    if (ma1 > -HIGHINF && ma2 > -HIGHINF) alt.push_back(abs(ma1-ma2) / 2);
    if (ma1 > -HIGHINF && ma3 > -HIGHINF) alt.push_back(abs(ma1-ma3));
    if (ma2 > -HIGHINF && ma3 > -HIGHINF) alt.push_back(abs(ma2-ma3));
  }
  sort(alt.begin(), alt.end());
  alt.erase(unique(alt.begin(), alt.end()), alt.end());
  double res = HIGHINF;
  REP(i, alt.size()) {
    double tmp = area(alt[i]);
    chmin(res, tmp);
  }
  return res;
}

int main() {
  cin >> n;
  x.resize(n); y.resize(n); d.resize(n);
  REP(i, n) cin >> x[i] >> y[i] >> d[i];
  double res = solve();
  cout << fixed << setprecision(10) << res << endl;
  return 0;
}


Measured memory_bytes: 1920