#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <utility>
#include <queue>
#include <set>
#include <map>
#include <deque>
#include <iomanip>
#include <cstdio>
#include <stack>
#include <numeric>

using namespace std;
typedef  long long ll;
typedef pair<int,int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
#define  MP make_pair
#define  PB push_back
#define inf 1000000007
#define mod 1000000007
#define rep(i,n) for(int i=0;i<(int)(n);++i)
int n;
vector<pair<pair<double,double>,pair<double,double> > > v;

pair<double,double> zahyo(pair<double,double> a,pair<double,double> b,double t){
    pair<double,double> s;
    s.first = a.first + b.first*t;
    s.second = a.second + b.second*t;
    return s;
}

double calc(double t){
    double xmax,xmin,ymax,ymin;
    xmax = -inf;
    xmin = inf;
    ymax = -inf;
    ymin = inf;
    rep(i,n){
        pair<double,double> s = zahyo(v[i].first,v[i].second,t);
        xmax=max(xmax,s.first);
        xmin=min(xmin,s.first);
        ymax=max(ymax,s.second);
        ymin=min(ymin,s.second);
    }
    return (xmax-xmin)*(ymax-ymin);
}


int main(){
    
    cin >> n;
    v.resize(n);
    vector<double> t;
    vector<double> xma(3,-inf);
    vector<double> xmi(3,inf);
    vector<double> yma(3,-inf);
    vector<double> ymi(3,inf);
    
    rep(i,n){
        double x,y;
        char c;
        cin >> x >> y >> c;
        ll a=0,b=0;
        if(c=='D'){
            b=-1;
            xma[0] = max(xma[0],x);
            xmi[0] = min(xmi[0],x);
            yma[1] = max(yma[1],y);
            ymi[1] = min(ymi[1],y);
        }else if(c=='L'){
            a = -1;
            xma[1] = max(xma[1],x);
            xmi[1] = min(xmi[1],x);
            yma[0] = max(yma[0],y);
            ymi[0] = min(ymi[0],y);
        }else if(c=='U'){
            b = 1;
            xma[0] = max(xma[0],x);
            xmi[0] = min(xmi[0],x);
            yma[2] = max(yma[2],y);
            ymi[2] = min(ymi[2],y);
        }else{
            a = 1;
            xma[2] = max(xma[2],x);
            xmi[2] = min(xmi[2],x);
            yma[0] = max(yma[0],y);
            ymi[0] = min(ymi[0],y);
        }
        v[i] = MP(MP(x,y),MP(a,b));
    }
    t.push_back(0);
    t.push_back(max(0.0,(xma[1]-xmi[2])/2.0));
    t.push_back(max(0.0,(xma[1]-xma[2])/2.0));
    t.push_back(max(0.0,(xmi[1]-xmi[2])/2.0));
    t.push_back(max(0.0,(xmi[1]-xma[2])/2.0));
    t.push_back(max(0.0,(yma[1]-ymi[2])/2.0));
    t.push_back(max(0.0,(yma[1]-yma[2])/2.0));
    t.push_back(max(0.0,(ymi[1]-ymi[2])/2.0));
    t.push_back(max(0.0,(ymi[1]-yma[2])/2.0));
    t.push_back(max(0.0,(xma[1]-xmi[0])/1.0));
    t.push_back(max(0.0,(xma[1]-xma[0])/1.0));
    t.push_back(max(0.0,(xmi[1]-xmi[0])/1.0));
    t.push_back(max(0.0,(xmi[1]-xma[0])/1.0));
    t.push_back(max(0.0,(yma[1]-ymi[0])/1.0));
    t.push_back(max(0.0,(yma[1]-yma[0])/1.0));
    t.push_back(max(0.0,(ymi[1]-ymi[0])/1.0));
    t.push_back(max(0.0,(ymi[1]-yma[0])/1.0));
    t.push_back(max(0.0,(xma[0]-xmi[2])/1.0));
    t.push_back(max(0.0,(xma[0]-xma[2])/1.0));
    t.push_back(max(0.0,(xmi[0]-xmi[2])/1.0));
    t.push_back(max(0.0,(xmi[0]-xma[2])/1.0));
    t.push_back(max(0.0,(yma[0]-ymi[2])/1.0));
    t.push_back(max(0.0,(yma[0]-yma[2])/1.0));
    t.push_back(max(0.0,(ymi[0]-ymi[2])/1.0));
    t.push_back(max(0.0,(ymi[0]-yma[2])/1.0));
    double res = (double)1e30;
    for(auto p:t){
        //cerr << p << endl;
        // if(res>calc(p)){
        //     cerr << p << " " << calc(p) << endl;
        // }
        res = min(res,calc(p));
        
    }
    cout.precision(10);
    cout << res << endl;
    return 0;
}

Measured memory_bytes: 3456