#include<bits/stdc++.h>
using namespace std;
#define all(v) ((v).begin()),((v).end())
#define ll long long
#define fastIO cout << fixed << setprecision(12), ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr)
double const EPS = 1e-12, PI = acos(-1);
const int N = 2e5 + 9, M = 5e3 + 9, OO = 1e9 + 7, MOD = 1e9 + 7;
const ll inf = 1e18;

ll n, x[N], y[N];
char d[N];

long double f(long double val) {
  long double minX = inf, minY = inf, maxX = -inf, maxY = -inf;
  for (int i = 0; i < n; ++i) {
    ll dirX = 0, dirY = 0;
    if(d[i] == 'U')
      dirY = 1;
    else if(d[i] == 'D')
      dirY = -1;
    else if(d[i] == 'R')
      dirX = 1;
    else
      dirX = -1;
    minX = min(minX, 1.0 * x[i] + 1.0 * dirX * val);
    minY = min(minY, 1.0 * y[i] + 1.0 * dirY * val);
    maxX = max(maxX, 1.0 * x[i] + 1.0 * dirX * val);
    maxY = max(maxY, 1.0 * y[i] + 1.0 * dirY * val);
  }
  return (maxX - minX) * (maxY - minY);
}

int main() {
  fastIO;
#ifdef LOCAL
  freopen("input.in", "rt", stdin);
#endif
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> x[i] >> y[i] >> d[i];
  }
  long double start = 0, end = 1e9 + 5;
  for (int i = 0; i < 750; ++i) {
    long double mid1 = start + (end - start) / 3;
    long double mid2 = end - (end - start) / 3;
    long double f1 = f(mid1);
    long double f2 = f(mid2);
    if(f1 < f2)
      end = mid2;
    else
      start = mid1;
  }
  cout << f(start);
  return 0;
}
