#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <string>
#include <utility>
#include <algorithm>
#include <cstdio>
#include <iomanip>
#include <queue>
#include <deque>
#include <stack>
#include <fstream>
#include <cmath>
#include <random>
#include <complex>
#include <functional>
#include <bitset>
#include <sstream>
#include <cassert>
#include <time.h>

#define ll int64_t
#define Rep(i, n) for (ll i = 0; i < n; i++)
using namespace std;
typedef vector<ll> vec;
typedef vector<vec> mat;

const ll inf = 1LL << 60;

template<class T> inline void chmin(T& a, T b) {
    if (a > b) {
        a = b;
    }
}
template<class T> inline void chmax(T& a, T b) {
    if (a < b) {
        a = b;
    }
}
void printvec (vec &v) {
    Rep (i, (ll)v.size()) {
        cout << v[i] << " \n"[i+1 == (ll)v.size()];
    }
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    ll N;
    cin >> N;

    set<ll> xr, xl, xfixed, yr, yl, yfixed;
    Rep (i, N) {
        ll x, y;
        char d;
        cin >> x >> y >> d;
        x *= 2;
        y *= 2;
        switch (d)
        {
        case 'R':
            xr.insert(x);
            yfixed.insert(y);
            break;

        case 'L':
            xl.insert(x);
            yfixed.insert(y);
            break;
        
        case 'U':
            xfixed.insert(x);
            yr.insert(y);
            break;

        case 'D':
            xfixed.insert(x);
            yl.insert(y);
            break;
        
        default:
            break;
        }
    }

    // cout << "xr\n";
    // for (ll e : xr) {
    //     cout << e << "\n";
    // }

    // cout << "xfixed\n";
    // for (ll e : xfixed) cout << e << "\n";

    // cout << "xl\n";
    // for (ll e : xl) cout << e << "\n"; 

    // cout << "yr\n";
    // for (ll e : yr) cout << e << "\n";

    // cout << "yfixed\n";
    // for (ll e : yfixed) cout << e << "\n";

    // cout << "yl\n";
    // for (ll e : yl) cout << e << "\n";

    set<ll> candidate;
    candidate.insert(0);

    if (xfixed.empty() and xl.empty() or xl.empty() and xr.empty() or xr.empty() and xfixed.empty()) {
    } else if (xr.empty()) {
        ll xmax2 = *(--xfixed.end());
        ll xmax3 = *(--xl.end());
        ll t2 = max<ll>(0, xmax3-xmax2);
        candidate.insert(t2);
    } else if (xfixed.empty()) {
        ll xmax1 = *(--xr.end());
        ll xmax3 = *(--xl.end());
        ll t3 = max<ll>(0, (xmax3-xmax1)/2);
        candidate.insert(t3);
    } else if (xl.empty()) {
        ll xmax1 = *(--xr.end());
        ll xmax2 = *(--xfixed.end());
        ll t1 = max<ll>(0, xmax2-xmax1);
        candidate.insert(t1);
    } else {
        ll xmax1 = *(--xr.end());
        ll xmax2 = *(--xfixed.end());
        ll xmax3 = *(--xl.end());
        ll t1 = max<ll>(0, xmax2-xmax1);
        ll t2 = max<ll>(0, xmax3-xmax2);
        ll t3 = max<ll>(0, (xmax3-xmax1)/2);
        candidate.insert(t1);
        candidate.insert(t2);
        candidate.insert(t3);
    }

    if (xfixed.empty() and xl.empty() or xl.empty() and xr.empty() or xr.empty() and xfixed.empty()) {
    } else if (xr.empty()) {
        ll xmax2 = *xfixed.begin();
        ll xmax3 = *xl.begin();
        ll t2 = max<ll>(0, xmax3-xmax2);
        candidate.insert(t2);
    } else if (xfixed.empty()) {
        ll xmax1 = *xr.begin();
        ll xmax3 = *xl.begin();
        ll t3 = max<ll>(0, (xmax3-xmax1)/2);
        candidate.insert(t3);
    } else if (xl.empty()) {
        ll xmax1 = *xr.begin();
        ll xmax2 = *xfixed.begin();
        ll t1 = max<ll>(0, xmax2-xmax1);
        candidate.insert(t1);
    } else {
        ll xmax1 = *xr.begin();
        ll xmax2 = *xfixed.begin();
        ll xmax3 = *xl.begin();
        ll t1 = max<ll>(0, xmax2-xmax1);
        ll t2 = max<ll>(0, xmax3-xmax2);
        ll t3 = max<ll>(0, (xmax3-xmax1)/2);
        candidate.insert(t1);
        candidate.insert(t2);
        candidate.insert(t3);
    }

    if (yfixed.empty() and yl.empty() or yl.empty() and yr.empty() or yr.empty() and yfixed.empty()) {
    } else if (yr.empty()) {
        ll xmax2 = *(--yfixed.end());
        ll xmax3 = *(--yl.end());
        ll t2 = max<ll>(0, xmax3-xmax2);
        candidate.insert(t2);
    } else if (yfixed.empty()) {
        ll xmax1 = *(--yr.end());
        ll xmax3 = *(--yl.end());
        ll t3 = max<ll>(0, (xmax3-xmax1)/2);
        candidate.insert(t3);
    } else if (yl.empty()) {
        ll xmax1 = *(--yr.end());
        ll xmax2 = *(--yfixed.end());
        ll t1 = max<ll>(0, xmax2-xmax1);
        candidate.insert(t1);
    } else {
        ll xmax1 = *(--yr.end());
        ll xmax2 = *(--yfixed.end());
        ll xmax3 = *(--yl.end());
        ll t1 = max<ll>(0, xmax2-xmax1);
        ll t2 = max<ll>(0, xmax3-xmax2);
        ll t3 = max<ll>(0, (xmax3-xmax1)/2);
        candidate.insert(t1);
        candidate.insert(t2);
        candidate.insert(t3);
    }

    if (yfixed.empty() and yl.empty() or yl.empty() and yr.empty() or yr.empty() and yfixed.empty()) {
    } else if (yr.empty()) {
        ll xmax2 = *yfixed.begin();
        ll xmax3 = *yl.begin();
        ll t2 = max<ll>(0, xmax3-xmax2);
        candidate.insert(t2);
    } else if (yfixed.empty()) {
        ll xmax1 = *yr.begin();
        ll xmax3 = *yl.begin();
        ll t3 = max<ll>(0, (xmax3-xmax1)/2);
        candidate.insert(t3);
    } else if (yl.empty()) {
        ll xmax1 = *yr.begin();
        ll xmax2 = *yfixed.begin();
        ll t1 = max<ll>(0, xmax2-xmax1);
        candidate.insert(t1);
    } else {
        ll xmax1 = *yr.begin();
        ll xmax2 = *yfixed.begin();
        ll xmax3 = *yl.begin();
        ll t1 = max<ll>(0, xmax2-xmax1);
        ll t2 = max<ll>(0, xmax3-xmax2);
        ll t3 = max<ll>(0, (xmax3-xmax1)/2);
        candidate.insert(t1);
        candidate.insert(t2);
        candidate.insert(t3);
    }

    ll ans = inf;

    for (ll t : candidate) {
        // cout << t << "\n";
        ll xmax = -inf;
        if (xr.size()) chmax(xmax, *(--xr.end())+t);
        if (xfixed.size()) chmax(xmax, *(--xfixed.end()));
        if (xl.size()) chmax(xmax, *(--xl.end())-t);
        ll xmin = inf;
        if (xr.size()) chmin(xmin, *(xr.begin())+t);
        if (xfixed.size()) chmin(xmin, *(xfixed.begin()));
        if (xl.size()) chmin(xmin, *(xl.begin())-t);
        ll ymax = -inf;
        if (yr.size()) chmax(ymax, *(--yr.end())+t);
        if (yfixed.size()) chmax(ymax, *(--yfixed.end()));
        if (yl.size()) chmax(ymax, *(--yl.end())-t);
        ll ymin = inf;
        if (yr.size()) chmin(ymin, *yr.begin()+t);
        if (yfixed.size()) chmin(ymin, *yfixed.begin());
        if (yl.size()) chmin(ymin, *yl.begin()-t);

        // cout << xmax << " " << xmin << " " << ymax << " " << ymin << "\n";
        // cout << (xmax-xmin) * (ymax-ymin) << "\n";
        chmin(ans, (xmax-xmin)*(ymax-ymin));
    }

    cout << fixed << setprecision(10) << ans/(long double)4.0 << endl;
}

Measured memory_bytes: 9088