#include <iostream>
#include <string>
#include <algorithm>
#include <ctime>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <cassert>
#include <bitset>
#include <list>
#include <cstdio>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <math.h>
#include <cmath>
#include <tuple>
#include <cassert>

using namespace std;
using ll = long long;
using pii = pair<int, int>;
using ti = tuple<int, int, int>;

#define FOR(i,m,n) for(int i=(m); i<(n); i++)
#define REP(i,n) for(int i=0; i<(n); i++)
#define RFOR(i,n,m) for(int i=(n);i>=(m); i--)
#define RREP(i,n) for(int i=(n-1); (i)>=0; i--)
#define pb push_back
#define mp make_pair
#define debug(x) cerr << #x << ": " << x << endl
// #define int long long 

const double eps=1e-14;
const int mod = 1e9 + 7;
const int inf = 100100100;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};

struct mint 
{
  ll x;
  mint(ll x=0):x((x%mod+mod)%mod){}
  mint operator-() const { return mint(-x);}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) { (x *= a.x) %= mod; return *this;}
  mint operator+(const mint a) const { return mint(*this) += a;}
  mint operator-(const mint a) const { return mint(*this) -= a;}
  mint operator*(const mint a) const { return mint(*this) *= a;}
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    if (t&1) a *= *this;
    return a;
  }
  mint inv() const { return pow(mod-2);}
  mint& operator/=(const mint a) { return *this *= a.inv();}
  mint operator/(const mint a) const { return mint(*this) /= a;}
};
istream& operator>>(istream& is, const mint& a) { return is >> a.x;}
ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}

#define mins(x,y) x = min(x,y)
#define maxs(x,y) x = max(x,y)

struct D
{
    vector<double> l, r;
    D():l(3,inf), r(3,-inf){}
    void add(double x, int v)
    {
        v++;
        mins(l[v],x);
        maxs(r[v],x);
    }
    double get(double t)
    {
        double nl = inf, nr = -inf;
        REP(i,3)
        {
            mins(nl, l[i]+i*t);
            maxs(nr, r[i]+i*t);
        }
        return nr-nl;
    }
    vector<double> events()
    {
        vector<double> ts;
        REP(i,3) REP(j,i)
        {
            {
                double t = (l[j]-l[i])/(i-j);
                if(t > 0) ts.pb(t);
            }
            {
                double t = (r[j]-r[i])/(i-j);
                if(t > 0) ts.pb(t);
            }
        }
        return ts;
    }
};

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    D xd, yd;
    REP(i,n)
    {
        int x, y;
        char d;
        cin >> x >> y >> d;
        if(d == 'L') xd.add(x,-1), yd.add(y,0);
        if(d == 'R') xd.add(x,1), yd.add(y,0);
        if(d == 'U') xd.add(x,0), yd.add(y,1);
        if(d == 'D') xd.add(x,0), yd.add(y,-1);
    }
    vector<double> ts;
    ts.pb(0);
    ts.pb(inf);
    {
        auto nts = xd.events();
        ts.insert(ts.end(), nts.begin(), nts.end());
    }
    {
        auto nts = yd.events();
        ts.insert(ts.end(), nts.begin(), nts.end());
    }
    sort(ts.begin(), ts.end());
    double ans = 1e18;
    for(double t:ts)
    {
        double now = xd.get(t)*yd.get(t);
        mins(ans,now);
    }
    printf("%.10f\n",ans);
    return 0;
}


Measured memory_bytes: 256