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

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }


// std::vector Declaration
template<typename T>
vector<T> make_v(size_t a) { return vector<T>(a); }
template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts) {
   return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));
}

// std::vector Initialization
template<typename T>
void fill_all(T& arr, const T& v) { arr = v; }
template<typename T, typename U>
void fill_all(T& arr, const U& v) { for (auto& i : arr) fill_all(i, v); }

// std::vector Debug
template<typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
   os << "[";
   bool a = 1;
   for (auto e : v ) {
      os << (a ? "" : " "); 
      os << e;
      a = 0;
   }
   os << "]";
   return os;
}

// std::pair Debug
template<typename T, typename U>
ostream& operator<<(ostream& os, const pair<T, U>& p) {
   os << "(" << p.first << " " << p.second << ")";
   return os;
}

// std::set Debug
template<typename T>
ostream& operator<<(ostream& os, const set<T>& st) {
   os << "{";
   bool a = 1;
   for (auto e : st) {
      os << (a ? "" : " ");
      os << e;
      a = 0;
   }
   os << "}";
   return os;
}

// std::multiset Debug
template<typename T>
ostream& operator<<(ostream& os, const multiset<T>& st) {
   os << "{";
   bool a = 1;
   for (auto e : st) {
      os << (a ? "" : " ");
      os << e;
      a = 0;
   }
   os << "}";
   return os;
}

// std::map Debug
template<typename T, typename U>
ostream& operator<<(ostream& os, const map<T, U>& mp) {
   os << "{";
   bool a = 1;
   for (auto e : mp) {
      os << (a ? "" : " ");
      os << e.first << ":" << e.second;
      a = 0;
   }
   os << "}";
   return os;
}

// std::tuple Debug
template<int N, class Tuple>
void out(ostream& os, const Tuple& t){}
template<int N, class Tuple, class H, class ...Ts>
void out(ostream& os, const Tuple& t) {
   if (N) os << " ";
   os << get<N>(t);
   out<N+1,Tuple,Ts...>(os, t);
}
template<class ...Ts>
ostream& operator<<(ostream& os, const tuple<Ts...>& t) {
   os << "(";
   out<0,tuple<Ts...>,Ts...>(os, t);
   os << ")";
   return os;
}

// Debug
#define DUMP(x) cerr<<#x<<" = "<<(x)<<endl


struct edge { int to, cost; };
ostream& operator<<(ostream& os, const edge& e) {
   os << "(" << e.to << ", " << e.cost << ")";
   return os;
}

const LL LINF = 1LL<<60;
const int IINF = 1<<30;
const LL MOD = 1e9+7;

int main()
{
   int N; cin >> N;
   vector<LL> x(N), y(N);
   vector<char> d(N);
   for (int i = 0; i < N; ++i) {
      cin >> x[i] >> y[i] >> d[i];
   }

   LL maxR = -LINF, maxL = -LINF, maxU = -LINF, maxD = -LINF;
   LL minR =  LINF, minL =  LINF, minU =  LINF, minD =  LINF;
   LL R = -LINF, L = LINF, U = -LINF, D = LINF;
   for (int i = 0; i < N; ++i) {
      switch (d[i]) {
         case 'U':
            chmax(R, x[i]);
            chmin(L, x[i]);
            chmax(maxU, y[i]);
            chmin(minU, y[i]);
            break;
         case 'D':
            chmax(R, x[i]);
            chmin(L, x[i]);
            chmax(maxD, y[i]);
            chmin(minD, y[i]);
            break;
         case 'R':
            chmax(U, y[i]);
            chmin(D, y[i]);
            chmax(maxR, x[i]);
            chmin(minR, x[i]);
            break;
         case 'L':
            chmax(U, y[i]);
            chmin(D, y[i]);
            chmax(maxL, x[i]);
            chmin(minL, x[i]);
            break;
      }
   }

   vector<double> ts{0};
   double t;

   t = (double)(minD - minU)/2;
   if (t + minU <= D) {
      ts.push_back(t);
   } else {
      ts.push_back(D - minU);
      ts.push_back(minD - D);
   }

   t = (double)(maxD - maxU)/2;
   if (t + maxU >= U) {
      ts.push_back(t);
   } else {
      ts.push_back(U - maxU);
      ts.push_back(maxD - U);
   }

   t = (double)(minL - minR)/2;
   if (t + minR <= L) {
      ts.push_back(t);
   } else {
      ts.push_back(L - minR);
      ts.push_back(minL - L);
   }

   t = (double)(maxL - maxR)/2;
   if (t + maxR >= R) {
      ts.push_back(t);
   } else {
      ts.push_back(R - maxR);
      ts.push_back(maxL - R);
   }


   double ans = 1e18;
   for (auto t : ts) {
      if (t < 0 || abs(t) >= 1e17) {
         continue;
      }
      chmin(ans,
            (max({ -t + maxD, t + maxU, (double)U }) - min({ t + minU, -t + minD, (double)D })) *
            (max({ -t + maxL, t + maxR, (double)R }) - min({ t + minR, -t + minL, (double)L })));
   }
   printf("%.9lf\n", ans);

   return 0;
}


Measured memory_bytes: 2048