#include <iostream>
#include <algorithm>
#include <bitset>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <cstring>
#include <utility>
#include <vector>
#include <complex>
#include <valarray>
#include <fstream>
#include <cassert>
#include <cmath>
#include <functional>
#include <iomanip>
#include <numeric>
#include <climits>
#include <random>

#define _overload(a, b, c, d, ...) d
#define _rep1(X, A, Y) for (int (X) = (A);(X) <= (Y);++(X))
#define _rep2(X, Y) for (int (X) = 0;(X) < (Y);++(X))
#define rep(...) _overload(__VA_ARGS__, _rep1, _rep2)(__VA_ARGS__)
#define rrep(X,Y) for (int (X) = Y-1;(X) >= 0;--(X))
#define all(X) (X).begin(),(X).end()
#define len(X) ((int)(X).size())
#define mod(n, m) (((n)%(m)+(m))%m)
#define fi first
#define sc second
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> Pii;
typedef pair<ll,ll> Pll;
const int INFINT = 1 << 30;                          // 1.07x10^ 9
const ll INFLL = 1LL << 60;                          // 1.15x10^18
const double EPS = 1e-10;
const int MOD = 1000000007;
const int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};

const int MAX_N = 100000;
int N;
ll x[MAX_N], y[MAX_N];
char d[MAX_N];

vector<Pll> seive(vector<Pll> v) {
  vector<Pll> res;
  if (len(v) == 0) return res;
  ll xma = -INFLL, xmi = INFLL, yma = -INFLL, ymi = INFLL;
  Pll pll;
  for (int i = 0; i < len(v); ++i) {
    if (xma < v[i].fi) {
      pll = v[i];
      xma = v[i].fi;
    }
  }
  res.push_back(pll);
  for (int i = 0; i < len(v); ++i) {
    if (xmi > v[i].fi) {
      pll = v[i];
      xmi = v[i].fi;
    }
  }
  res.push_back(pll);
  for (int i = 0; i < len(v); ++i) {
    if (yma < v[i].sc) {
      pll = v[i];
      yma = v[i].sc;
    }
  }
  res.push_back(pll);
  for (int i = 0; i < len(v); ++i) {
    if (ymi > v[i].sc) {
      pll = v[i];
      ymi = v[i].sc;
    }
  }
  res.push_back(pll);
  
  return res;
}

int main() {

  cin >> N;
  rep(i, N) cin >> x[i] >> y[i] >> d[i];

  if (N == 1) {
    cout << 0 << endl;
    return 0;
  }

  vector<Pll> left, right, up, down;
  for (int i = 0; i < N; ++i) {
    if (d[i] == 'L') {
      left.push_back(Pll(x[i], y[i]));
    } else if (d[i] == 'R') {
      right.push_back(Pll(x[i], y[i]));
    } else if (d[i] == 'U') {
      up.push_back(Pll(x[i], y[i]));
    } else {
      down.push_back(Pll(x[i], y[i]));
    }
  }

  vector<Pll> left2 = seive(left);
  vector<Pll> right2 = seive(right);
  vector<Pll> up2 = seive(up);
  vector<Pll> down2 = seive(down);

  set<double> st;
  st.insert(0);
  // right
  for (int i = 0; i < len(right2); ++i) {
    for (int j = 0; j < len(left2); ++j) {
      if (right2[i].fi >= left2[i].fi)  continue;
      st.insert((left2[i].fi-right2[i].fi)/2.0);
    }

    for (int j = 0; j < len(up2); ++j) {
      if (right2[i].fi >= up2[i].fi) continue;
      st.insert(up2[i].fi - right2[i].fi);
    }

    for (int j = 0; j < len(down2); ++j) {
      if (right2[i].fi >= down2[i].fi) continue;
      st.insert(down2[i].fi - right2[i].fi);
    }
  }

  // left
  for (int i = 0; i < len(left2); ++i) {
    for (int j = 0; j < len(up2); ++j) {
      if (left2[i].fi <= up2[i].fi) continue;
      st.insert(left2[i].fi - up2[i].fi);
    }

    for (int j = 0; j < len(down2); ++j) {
      if (left2[i].fi <= down2[i].fi) continue;
      st.insert(left2[i].fi - down2[i].fi);
    }
  }

  // up
  for (int i = 0; i < len(up2); ++i) {
    for (int j = 0; j < len(down2); ++j) {
      if (up2[i].sc >= down2[i].sc)  continue;
      st.insert((down2[i].sc-up2[i].sc)/2.0);
    }

    for (int j = 0; j < len(right2); ++j) {
      if (right2[i].sc <= up2[i].sc) continue;
      st.insert(right2[i].sc - up2[i].sc);
    }

    for (int j = 0; j < len(left2); ++j) {
      if (left2[i].sc <= up2[i].sc) continue;
      st.insert(left2[i].sc - up2[i].sc);
    }
  }

  // down
  for (int i = 0; i < len(down2); ++i) {

    for (int j = 0; j < len(right2); ++j) {
      if (right2[i].sc >= down2[i].sc) continue;
      st.insert(down2[i].sc - right2[i].sc);
    }

    for (int j = 0; j < len(left2); ++j) {
      if (left2[i].sc >= down2[i].sc) continue;
      st.insert(down2[i].sc - left2[i].sc);
    }
  }

  double ans = INFLL;
  for (double t : st) {
    double xma = -INFLL, xmi = INFLL, yma = -INFLL, ymi = INFLL;

    for (int i = 0; i < len(right2); ++i) {
      xma = max(xma, right2[i].fi+t);
      xmi = min(xmi , right2[i].fi+t);
      yma = max(yma, (double)right2[i].sc);
      ymi = min(ymi, (double)right2[i].sc);
    }
    for (int i = 0; i < len(left2); ++i) {
      xma = max(xma, left2[i].fi-t);
      xmi = min(xmi , left2[i].fi-t);
      yma = max(yma, (double)left2[i].sc);
      ymi = min(ymi, (double)left2[i].sc);
    }
    for (int i = 0; i < len(up2); ++i) {
      xma = max(xma, (double)up2[i].fi);
      xmi = min(xmi , (double)up2[i].fi);
      yma = max(yma, up2[i].sc+t);
      ymi = min(ymi, up2[i].sc+t);
    }
    for (int i = 0; i < len(down2); ++i) {
      xma = max(xma, (double)down2[i].fi);
      xmi = min(xmi , (double)down2[i].fi);
      yma = max(yma, down2[i].sc-t);
      ymi = min(ymi, down2[i].sc-t);
    }

    cerr << "t: " << t << ", scoer: " << (xma-xmi)*(yma-ymi) << endl;
    cerr << "xma: " << xma << ", xmi: " << xmi << ", yma: " << yma << ", ymi: " << ymi << endl;
    cerr << "len(right2): " << len(right2) << "len(left2): " << len(left2) << "len(up2): " << len(up2) << "len(down2): " << len(down2) << endl;
    ans = min(ans, (xma-xmi)*(yma-ymi));
  }

  printf("%.14lf\n", ans);

  return 0;
}



Measured memory_bytes: 4328