#include <bits/stdc++.h>
using namespace std;using ll=long long;using uint=unsigned int;using pii=pair<int,int>;using pll=pair<ll,ll>;using ull = unsigned long long;using ld=long double;template<typename T>void _(const char*s,T h){cerr<<s<<" = "<<h<<"\n";}template<typename T,typename...Ts>void _(const char*s,T h,Ts...t){int b=0;while(((b+=*s=='(')-=*s==')')!=0||*s!=',')cerr<<*s++;cerr<<" = "<<h<<",";_(s+1,t...);}// break continue pop_back 998244353
#define int ll
#define pii pll
#define f first
#define s second
#define pb emplace_back
#define forn(i,n) for(int i=0;i<(n);++i)
#define sz(a)((int)(a).size())
#define sqr(x) ((x)*(x))
struct init{init(){cin.tie(0);iostream::sync_with_stdio(0);cout<<fixed<<setprecision(10);cerr<<fixed<<setprecision(5);}~init(){
#ifdef LOCAL
#define dbg(...) _(#__VA_ARGS__,__VA_ARGS__)
cerr<<"Time elapsed: "<<(double)clock()/CLOCKS_PER_SEC<<"s.\n";
#else
#define dbg(...) 
#endif
}}init;template<typename T,typename U>void upx(T&x,U y){if(x<y)x=y;}template<typename T,typename U>void upn(T&x,U y){if(x>y)x=y;}mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());const int D=4,dx[]={+1,0,-1,0},dy[]={0,+1,0,-1};
const int N=1e5,OO=1e18;
int x[N],y[N];
char d[N];
int n;
int gin(char di,int*w){
    int r=-1;
    forn(i,n)if(d[i]==di&&(r==-1||w[r]>w[i]))r=i;
    return r;
}
int gax(char di,int*w){
    int r=-1;
    forn(i,n)if(d[i]==di&&(r==-1||w[r]<w[i]))r=i;
    return r;
}
int ans=OO;
int mnx=OO,mxx=-OO,mny=OO,mxy=-OO;
void se(int cx,int cy){
    upn(mnx,cx);
    upx(mxx,cx);
    upn(mny,cy);
    upx(mxy,cy);
}
void ev(int t){
    mnx=OO,mxx=-OO,mny=OO,mxy=-OO;
    forn(i,n){
        if(d[i]=='U')se(x[i],y[i]+t);
        else if(d[i]=='D')se(x[i],y[i]-t);
        else if(d[i]=='L')se(x[i]-t,y[i]);
        else se(x[i]+t,y[i]);
    }
    upn(ans,(mxx-mnx)*(mxy-mny));
}
int32_t main(){
    cin>>n;
    forn(i,n){
        cin>>x[i]>>y[i]>>d[i];
        x[i]*=2;
        y[i]*=2;
    }
    vector<int> t={0};
    {
        int p1=gax('D',y),p2=gax('U',y);
        if(p1>=0&&p2>=0&&y[p1]>y[p2])t.pb((y[p1]-y[p2])/2);
        else t.pb(0);
    }
    {
        int p1=gax('L',y),p2=gax('U',y);
        if(p1>=0&&p2>=0&&y[p1]>y[p2])t.pb(y[p1]-y[p2]);
        else t.pb(0);
    }
    {
        int p1=gax('R',y),p2=gax('U',y);
        if(p1>=0&&p2>=0&&y[p1]>y[p2])t.pb(y[p1]-y[p2]);
        else t.pb(0);
    }
    {
        int p1=gin('D',y),p2=gin('U',y);
        if(p1>=0&&p2>=0&&y[p1]>y[p2])t.pb((y[p1]-y[p2])/2);
        else t.pb(0);
    }
    {
        int p1=gin('L',y),p2=gin('U',y);
        if(p1>=0&&p2>=0&&y[p1]>y[p2])t.pb(y[p1]-y[p2]);
        else t.pb(0);
    }
    {
        int p1=gin('R',y),p2=gin('U',y);
        if(p1>=0&&p2>=0&&y[p1]>y[p2])t.pb(y[p1]-y[p2]);
        else t.pb(0);
    }
    {
        int p2=gin('U',y),p1=gin('D',y);
        if(p1>=0&&p2>=0&&y[p1]>y[p2])t.pb((y[p1]-y[p2])/2);
        else t.pb(0);
    }
    {
        int p2=gin('L',y),p1=gin('D',y);
        if(p1>=0&&p2>=0&&y[p1]>y[p2])t.pb(y[p1]-y[p2]);
        else t.pb(0);
    }
    {
        int p2=gin('R',y),p1=gin('D',y);
        if(p1>=0&&p2>=0&&y[p1]>y[p2])t.pb(y[p1]-y[p2]);
        else t.pb(0);
    }
    {
        int p2=gax('U',y),p1=gax('D',y);
        if(p1>=0&&p2>=0&&y[p1]>y[p2])t.pb((y[p1]-y[p2])/2);
        else t.pb(0);
    }
    {
        int p2=gax('L',y),p1=gax('D',y);
        if(p1>=0&&p2>=0&&y[p1]>y[p2])t.pb(y[p1]-y[p2]);
        else t.pb(0);
    }
    {
        int p2=gax('R',y),p1=gax('D',y);
        if(p1>=0&&p2>=0&&y[p1]>y[p2])t.pb(y[p1]-y[p2]);
        else t.pb(0);
    }
    {
        int p2=gin('R',x),p1=gin('L',x);
        if(p1>=0&&p2>=0&&x[p1]>x[p2])t.pb((x[p1]-x[p2])/2);
        else t.pb(0);
    }
    {
        int p2=gin('U',x),p1=gin('L',x);
        if(p1>=0&&p2>=0&&x[p1]>x[p2])t.pb(x[p1]-x[p2]);
        else t.pb(0);
    }
    {
        int p2=gin('D',x),p1=gin('L',x);
        if(p1>=0&&p2>=0&&x[p1]>x[p2])t.pb(x[p1]-x[p2]);
        else t.pb(0);
    }
    {
        int p2=gax('R',x),p1=gax('L',x);
        if(p1>=0&&p2>=0&&x[p1]>x[p2])t.pb((x[p1]-x[p2])/2);
        else t.pb(0);
    }
    {
        int p2=gax('U',x),p1=gax('L',x);
        if(p1>=0&&p2>=0&&x[p1]>x[p2])t.pb(x[p1]-x[p2]);
        else t.pb(0);
    }
    {
        int p2=gax('D',x),p1=gax('L',x);
        if(p1>=0&&p2>=0&&x[p1]>x[p2])t.pb(x[p1]-x[p2]);
        else t.pb(0);
    }
    {
        int p2=gax('R',x),p1=gax('L',x);
        if(p1>=0&&p2>=0&&x[p1]>x[p2])t.pb((x[p1]-x[p2])/2);
        else t.pb(0);
    }
    {
        int p2=gax('R',x),p1=gax('U',x);
        if(p1>=0&&p2>=0&&x[p1]>x[p2])t.pb(x[p1]-x[p2]);
        else t.pb(0);
    }
    {
        int p2=gax('R',x),p1=gax('D',x);
        if(p1>=0&&p2>=0&&x[p1]>x[p2])t.pb(x[p1]-x[p2]);
        else t.pb(0);
    }
    {
        int p2=gin('R',x),p1=gin('L',x);
        if(p1>=0&&p2>=0&&x[p1]>x[p2])t.pb((x[p1]-x[p2])/2);
        else t.pb(0);
    }
    {
        int p2=gin('R',x),p1=gin('U',x);
        if(p1>=0&&p2>=0&&x[p1]>x[p2])t.pb(x[p1]-x[p2]);
        else t.pb(0);
    }
    {
        int p2=gin('R',x),p1=gin('D',x);
        if(p1>=0&&p2>=0&&x[p1]>x[p2])t.pb(x[p1]-x[p2]);
        else t.pb(0);
    }
    for(int z:t)
        ev(z);
    double dans=ans/4.;
    cout<<dans<<'\n';
    return 0;
}


Measured memory_bytes: 5480