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

typedef long long ll;

ll N;
map<char, map<ll, set<double>>> Vs;
double R = 1e20;

void update(double t) {
  t = abs(t);
  double res = 1;
  for (char xy : {'x', 'y'}) {
    set<double> avs;
    for (const auto &d_vs : Vs[xy]) {
      ll d = d_vs.first;
      const auto &vs = d_vs.second;
      avs.insert(*vs.begin() + d * t);
      avs.insert(*vs.rbegin() + d * t);
    }
    res *= *avs.rbegin() - *avs.begin();
  }
  R = min(R, res);
}
int main() {
  cin >> N;
  for (ll i = 0; i < N; ++i) {
    double x, y;
    char d;
    cin >> x >> y >> d;
    Vs['x'][d == 'R' ? 1 : d == 'L' ? -1 : 0].insert(x);
    Vs['y'][d == 'U' ? 1 : d == 'D' ? -1 : 0].insert(y);
  }
  update(0);
  for (char xy : {'x', 'y'}) {
    for (ll d : {0, 1, -1}) {
      if (!Vs[xy].count(d)) continue;
      for (ll d2 : {0, 1, -1}) {
        if (d >= d2) continue;
        if (!Vs[xy].count(d2)) continue;
        const auto &vs = Vs[xy][d], &vs2 = Vs[xy][d2];
        update((*vs2.begin() - *vs.begin()) / (d - d2));
        update((*vs2.rbegin() - *vs.rbegin()) / (d - d2));
      }
    }
  }
  cout << setprecision(10) << R << endl;
  return 0;
}
