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

using i64 = int64_t;

#define rep(i, x, y) for (i64 i = i64(x), i##_max_for_repmacro = i64(y); i < i##_max_for_repmacro; ++i)
#define debug(x) #x << "=" << (x)

#ifdef DEBUG
#define _GLIBCXX_DEBUG
#define print(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl
#else
#define print(x)
#endif

const int inf = 1.01e9;
const i64 inf64 = 2.01e18;
const double eps = 1e-7;

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

template <typename T>
ostream &operator<<(ostream &os, const vector<T> &vec) {
    os << "[";
    for (const auto &v : vec) {
        os << v << ",";
    }
    os << "]";
    return os;
}

template <typename T>
bool chmin(T &a, const T &b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}

template <typename T>
bool chmax(T &a, const T &b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

template<typename T, size_t size> void fill(T (&ary)[size], const T& val){
    fill_n((T*)ary, size, val);
}

void solve() {
    //const i64 mod = 1'000'000'007;

    i64 N;
    cin >> N;
    vector<long double> x(N),y(N);
    vector<char> d(N);
    rep(i,0,N) cin >> x[i] >> y[i] >> d[i];

    vector<pair<long double, i64>> xd,yd; // (初期位置, 方向)
    {
        long double lmin=inf64,lmax=-inf64,rmin=inf64,rmax=-inf64,udmin=inf64,udmax=-inf64;
        rep(i,0,N){
            if(d[i]=='L'){
                chmin(lmin,x[i]);
                chmax(lmax,x[i]);
            }else if(d[i]=='R'){
                chmin(rmin,x[i]);
                chmax(rmax,x[i]);
            }else{
                chmin(udmin,x[i]);
                chmax(udmax,x[i]);
            }
        }
        xd.emplace_back(make_pair(lmin,-1));
        xd.emplace_back(make_pair(lmax,-1));
        xd.emplace_back(make_pair(rmin,1));
        xd.emplace_back(make_pair(rmax,1));
        xd.emplace_back(make_pair(udmin,0));
        xd.emplace_back(make_pair(udmax,0));

        xd.erase(remove_if(begin(xd), end(xd), [&](auto p){ return p.first == inf64 or p.first == -inf64; }), end(xd));
    }
    {
        long double dmin=inf64,dmax=-inf64,umin=inf64,umax=-inf64,lrmin=inf64,lrmax=-inf64;
        rep(i,0,N){
            if(d[i]=='D'){
                chmin(dmin,y[i]);
                chmax(dmax,y[i]);
            }else if(d[i]=='U'){
                chmin(umin,y[i]);
                chmax(umax,y[i]);
            }else{
                chmin(lrmin,y[i]);
                chmax(lrmax,y[i]);
            }
        }
        yd.emplace_back(make_pair(dmin,-1));
        yd.emplace_back(make_pair(dmax,-1));
        yd.emplace_back(make_pair(umin,1));
        yd.emplace_back(make_pair(umax,1));
        yd.emplace_back(make_pair(lrmin,0));
        yd.emplace_back(make_pair(lrmax,0));

        yd.erase(remove_if(begin(yd), end(yd), [&](auto p){ return p.first == inf64 or p.first == -inf64; }), end(yd));
    }

    vector<long double> ts={0,inf};
    rep(i,0,xd.size()){
        rep(j,i+1,xd.size()){
            auto p=xd[i],q=xd[j];
            if(p.second == q.second) continue;
            else if(p.second == 0) ts.emplace_back((p.first-q.first)/q.second); // p.first = q.first + q.second * t
            else if(q.second == 0) ts.emplace_back((q.first-p.first)/p.second); // q.first = p.first + p.second * t
            else ts.emplace_back((p.first-q.first)/(q.second-p.second)); // p.first + p.second * t = q.first + q.second * t
        }
    }
    rep(i,0,yd.size()){
        rep(j,i+1,yd.size()){
            auto p=yd[i],q=yd[j];
            if(p.second == q.second) continue;
            else if(p.second == 0) ts.emplace_back((p.first-q.first)/q.second); // p.first = q.first + q.second * t
            else if(q.second == 0) ts.emplace_back((q.first-p.first)/p.second); // q.first = p.first + p.second * t
            else ts.emplace_back((p.first-q.first)/(q.second-p.second)); // p.first + p.second * t = q.first + q.second * t
        }
    }

    ts.erase(remove_if(begin(ts),end(ts),[](long double t){ return t<0; }), end(ts));

    auto f=[&](long double t){
        long double xmin=inf64,xmax=-inf64,ymin=inf64,ymax=-inf64;
        rep(i,0,xd.size()){
            auto p=xd[i];
            chmin(xmin,p.first+p.second*t);
            chmax(xmax,p.first+p.second*t);
        }
        rep(i,0,yd.size()){
            auto p=yd[i];
            chmin(ymin,p.first+p.second*t);
            chmax(ymax,p.first+p.second*t);
        }

        return (xmax-xmin)*(ymax-ymin);
    };

    long double ans=inf64;
    for(auto t:ts){
        chmin(ans,f(t));
    }

    print(xd);
    print(yd);
    print(ts);

    cout << ans << endl;
}

int main() {
    std::cin.tie(0);
    std::ios::sync_with_stdio(false);
    cout.setf(ios::fixed);
    cout.precision(16);
    solve();
    return 0;
}


Measured memory_bytes: 3456