#include <bits/stdc++.h>
using namespace std;
#define SZ(v) int((v).size())
#define ALL(vec) (vec).begin(),(vec).end()
template<typename T> inline bool uax(T &x, T y) {return (y > x) ? x = y, true : false;}
template<typename T> inline bool uin(T &x, T y) {return (y < x) ? x = y, true : false;}

#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); \
  stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
void err(istream_iterator<string>) {}
template<typename T1,typename T2> ostream& operator<<(ostream& os, pair<T1,T2> buf) {
  return os << "(" << buf.first << ": " << buf.second << ")"; }
#define DefOut(Con) template<typename T>ostream&operator<<(ostream&os,Con<T>&A){ bool f = false; os << "{"; \
  for (const auto e: A) { if (f) os << ", "; os << e; f = true; } return os << "}"; }
#define DefOut2(Con) template<typename K,typename V>ostream&operator<<(ostream&os,Con<K,V>&A) \
{ bool f = false; os << "{"; for (auto &e: A) { if (f) os << ", "; os << e; f = true; } return os << "}"; }
template<typename T>ostream &operator << (ostream &os,vector<vector<T>>& A) {
  for (auto &B: A) os << '\n' << B; return os; }
DefOut(vector) DefOut(set) DefOut(multiset) DefOut2(map) 
template<typename T,typename... Args> void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " =: " << a << endl; err(++it, args...); }
template<typename T> void kek(T ans) {cout << ans << endl; exit(0);}
int const MOD = 1000000007;
long long const INF = 1e18;
#define PI 3.14159265358979323846
/***********************************************************************/
typedef long double i64;

int32_t main() {

  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);

  int n;
  cin >> n;
  i64 Xmin = INF, Xmax = -INF, Ymin = INF, Ymax = -INF;
  vector<i64> up, dn, lf, rg;
  for (int i = 0; i < n; ++i) {
    i64 x, y; char d;
    cin >> x >> y >> d;
    if (d == 'U') {
      uin(Xmin, x);
      uax(Xmax, x);
      up.push_back(y);
    }
    if (d == 'D') {
      uin(Xmin, x);
      uax(Xmax, x);
      dn.push_back(y);
    }
    if (d == 'L') {
      uin(Ymin, y);
      uax(Ymax, y);
      lf.push_back(x);
    }
    if (d == 'R') {
      uin(Ymin, y);
      uax(Ymax, y);
      rg.push_back(x);
    }
  }
  
  i64 ans = INF;
  auto check = [&] (i64 t) {
    //~ error(t);
    i64 xmin = Xmin, xmax = Xmax, ymin = Ymin, ymax = Ymax;
    if (!lf.empty()) {
      uin(xmin, lf[0] - t);
      uax(xmax, lf.back() - t);
    }
    if (!rg.empty()) {
      uin(xmin, rg[0] + t);
      uax(xmax, rg.back() + t);
    }
    if (!dn.empty()) {
      uin(ymin, dn[0] - t);
      uax(ymax, dn.back() - t);
    }
    if (!up.empty()) {
      uin(ymin, up[0] + t);
      uax(ymax, up.back() + t);
    }
    uin(ans, (xmax - xmin) * (ymax - ymin));
    return (xmax - xmin) * (ymax - ymin);
  };
  sort(ALL(up));
  sort(ALL(dn));
  sort(ALL(lf));
  sort(ALL(rg));
  check(0);
  
  i64 lo = 0, hi = 1e18;
  for (int i = 0; i < 542; ++i) {
    i64 md1 = lo + (hi - lo) / 3;
    i64 md2 = hi - (hi - lo) / 3;
    if (check(md1) < check(md2)) hi = md2;
    else lo = md1;
  }
  cout.precision(15);
  cout << fixed << ans << endl;
  
  return 0;
}


Measured memory_bytes: 2284