#include <algorithm>
#include <iostream>
#include <vector>
#include <math.h>
#include <set>
#include <map>
#include <string>
#include <stack>
#include <queue>
#include <iomanip>
#include <numeric>
#include <tuple>
#include <bitset>
#include <complex>
#include <unistd.h>
#include <cassert>
#include <cctype>
#include <random>
#include <time.h>
#define _USE_MATH_DEFINES
#define _GLIBCXX_DEBUG
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> plglg;
typedef pair<double, ll> pdlg;
typedef tuple<int, int, int> tiii;
typedef tuple<ll, ll, ll> tlglglg;
typedef tuple<double, double, double> tddd;
typedef complex<double> xy_t;
typedef vector<ll> vll;
typedef vector< vector<ll> > matrix;
#define REP(i, x, y) for(ll i = (ll)x; i < (ll)y; i++)
#define DREP(i, x, y, d) for(ll i = (ll)x; i < (ll)y; i += (ll)d)
#define PER(i, x, y) for(ll i = (ll)x; i > (ll)y; i--)
#define DPER(i, x, y, d) for(ll i = (ll)x; i > (ll)y; i -= (ll)d)
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
double pi = 3.141592653589793;
ll mod = 1000000007;
int intmax = 2147483647;
int intmin = -2147483648;
ll llmax = 9223372036854775807;
ll llmin = -9223372036854775807;
int iinf = intmax / 8;
ll inf = llmax / 8;
double eps = 1e-12;

int main() {
    cout << fixed;
    cout << setprecision(12);
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll N;
    cin >> N;
    plglg pt[N];
    char d[N];
    REP(i, 0, N) {
        ll x, y;
        cin >> x >> y >> d[i];
        pt[i] = plglg(x, y);
    }
    vector<plglg> vecr, vecl, vecu, vecd, veclr, vecud;
    REP(i, 0, N) {
        if (d[i] == 'R') {
            vecr.push_back(pt[i]);
            veclr.push_back(plglg(pt[i].second, pt[i].first));
        }
        if (d[i] == 'L') {
            vecl.push_back(pt[i]);
            veclr.push_back(plglg(pt[i].second, pt[i].first));
        }
        if (d[i] == 'U') {
            vecu.push_back(plglg(pt[i].second, pt[i].first));
            vecud.push_back(pt[i]);
        }
        if (d[i] == 'D') {
            vecd.push_back(plglg(pt[i].second, pt[i].first));
            vecud.push_back(pt[i]);
        }
    }
    sort(vecr.begin(), vecr.end());
    sort(vecl.begin(), vecl.end());
    sort(vecu.begin(), vecu.end());
    sort(vecd.begin(), vecd.end());
    sort(veclr.begin(), veclr.end());
    sort(vecud.begin(), vecud.end());
    // ll lrbot = veclr[0].first;
    // ll lrtop = veclr[lrsize - 1].first;
    // ll udleft = vecud[0].first;
    // ll udright = vecud[vecud.size() - 1].first;
    // ll rleft = vecr[0].first;
    // ll rright = vecr[vecr.size() - 1].first;
    // ll lleft = vecl[0].first;
    // ll lright = vecl[vecl.size() - 1].first;
    // ll ubot = vecu[0].first;
    // ll utop = vecu[usize - 1].first;
    // ll dbot = vecd[0].first;
    // ll dtop = vecd[dsize - 1].first;
    ll usize = vecu.size();
    ll dsize = vecd.size();
    ll lsize = vecl.size();
    ll rsize = vecr.size();
    ll udsize = vecud.size();
    ll lrsize = veclr.size();
    double botupst;
    if (usize == 0 || (dsize > 0 && vecu[0].first > vecd[0].first)
        || (lrsize > 0 && vecu[0].first > veclr[0].first)) {
        botupst = -1 ;
    } else if (dsize == 0 && lrsize == 0) {
        botupst = inf;
    } else {
        botupst = inf;
        if (dsize > 0) {
            botupst = min(botupst, (vecd[0].first - vecu[0].first) / 2.0);
        }
        if (lrsize > 0) {
            botupst = min(botupst, (double)(veclr[0].first - vecu[0].first));
        }
    }
    // cout << botupst << endl;
    double botstdown;
    if (dsize == 0) {
        botstdown = inf;
    } else if (usize == 0) {
        if (lrsize == 0) {
            botstdown = -1;
        } else if (veclr[0].first > vecd[0].first) {
            botstdown = -1;
        } else {
            botstdown = (double)(vecd[0].first - veclr[0].first);
        }
    } else {
        if (lrsize == 0) {
            if (vecu[0].first > vecd[0].first) {
                botstdown = -1;
            } else {
                botstdown = (vecd[0].first - vecu[0].first) / 2.0;
            }
        } else {
            botstdown = -1;
            if (vecu[0].first < vecd[0].first) {
                botstdown = max(botstdown, (vecd[0].first - vecu[0].first) / 2.0);
                // cout << (vecd[0].first - vecu[0].first) / 2.0 << endl;
            }
            if (veclr[0].first < vecd[0].first) {
                botstdown = max(botstdown, (double)(vecd[0].first - veclr[0].first));
                // cout << (double)(vecd[0].first - veclr[0].first) << endl;
            }
        }
    }
    // cout << botstdown << endl;

    double topdownst;
    if (dsize == 0 || (usize > 0 && vecd[dsize - 1].first < vecu[usize - 1].first)
        || (lrsize > 0 && vecd[dsize - 1].first < veclr[lrsize - 1].first)) {
        topdownst = -1;
    } else if (usize == 0 && lrsize == 0) {
        topdownst = inf;
    } else {
        topdownst = inf;
        if (usize != 0) {
            topdownst = min(topdownst, (vecd[dsize - 1].first - vecu[usize - 1].first) / 2.0);
        }
        if (lrsize != 0) {
            topdownst = min(topdownst, (double)(vecd[dsize - 1].first - veclr[lrsize - 1].first));
        }
    }
    // cout << topdownst << endl;
    double topstup;
    if (usize == 0) {
        topstup = inf;
    } else if (dsize == 0) {
        if (lrsize == 0) {
            topstup = -1;
        } else if (veclr[lrsize - 1].first < vecu[usize - 1].first) {
            topstup = -1;
        } else {
            topstup = (double)(veclr[lrsize - 1].first - vecu[usize - 1].first);
        }
    } else {
        if (lrsize == 0) {
            if (vecd[dsize - 1].first < vecu[usize - 1].first) {
                topstup = -1;
            } else {
                topstup = (vecd[dsize - 1].first - vecu[usize - 1].first) / 2.0;
            }
        } else {
            topstup = -1;
            if (vecu[usize - 1].first < vecd[dsize - 1].first) {
                topstup = max(topstup, (vecd[dsize - 1].first - vecu[usize - 1].first) / 2.0);
            }
            if (vecu[usize - 1].first < veclr[lrsize - 1].first) {
                topstup = max(topstup, (double)(veclr[lrsize - 1].first - vecu[usize - 1].first));
            }
        }
    }
    // cout << topstup << endl;

    double leftrtst;
    if (rsize == 0 || (lsize > 0 && vecr[0].first > vecl[0].first)
        || (udsize > 0 && vecr[0].first > vecud[0].first)) {
        leftrtst = -1;
    } else if (lsize == 0 && udsize == 0) {
        leftrtst = inf;
    } else {
        leftrtst = inf;
        if (lsize > 0) {
            leftrtst = min(leftrtst, (vecl[0].first - vecr[0].first) / 2.0);
        }
        if (udsize > 0) {
            leftrtst = min(leftrtst, (double)(vecud[0].first - vecr[0].first));
        }
    }
    // cout << leftrtst << endl;
    double leftstlf;
    if (lsize == 0) {
        leftstlf = inf;
    } else if (rsize == 0) {
        if (udsize == 0) {
            leftstlf = -1;
        } else if (vecud[0].first > vecl[0].first) {
            leftstlf = -1;
        } else {
            leftstlf = (double)(vecl[0].first - vecud[0].first);
        }
    } else {
        if (udsize == 0) {
            if (vecr[0].first > vecl[0].first) {
                leftstlf = -1;
            } else {
                leftstlf = (vecl[0].first - vecr[0].first) / 2.0;
            }
        } else {
            leftstlf = -1;
            if (vecr[0].first < vecl[0].first) {
                leftstlf = max(leftstlf, (vecl[0].first - vecr[0].first) / 2.0);
            }
            if (vecud[0].first < vecl[0].first) {
                leftstlf = max(leftstlf, (double)(vecl[0].first - vecud[0].first));
            }
        }
    }
    // cout << leftstlf << endl;

    double rightlfst;
    if (lsize == 0 || (rsize > 0 && vecl[lsize - 1].first < vecr[rsize - 1].first)
        || (udsize > 0 && vecl[lsize - 1].first < vecud[udsize - 1].first)) {
        rightlfst = -1;
    } else if (rsize == 0 && udsize == 0) {
        rightlfst = inf;
    } else {
        rightlfst = inf;
        if (rsize != 0) {
            rightlfst = min(rightlfst, (vecl[lsize - 1].first - vecr[rsize - 1].first) / 2.0);
        }
        if (udsize != 0) {
            rightlfst = min(rightlfst, (double)(vecl[lsize - 1].first - vecud[udsize - 1].first));
        }
    }
    double rightstrt;
    if (rsize == 0) {
        rightstrt = inf;
    } else if (lsize == 0) {
        if (udsize == 0) {
            rightstrt = -1;
        } else if (vecud[udsize - 1].first < vecr[rsize - 1].first) {
            rightstrt = -1;
        } else {
            rightstrt = (double)(veclr[udsize - 1].first - vecr[rsize - 1].first);
        }
    } else {
        if (udsize == 0) {
            if (vecl[lsize - 1].first < vecr[rsize - 1].first) {
                rightstrt = -1;
            } else {
                rightstrt = (vecl[lsize - 1].first - vecr[rsize - 1].first) / 2.0;
            }
        } else {
            rightstrt = -1;
            if (vecr[rsize - 1].first < vecl[lsize - 1].first) {
                rightstrt = max(rightstrt, (vecl[lsize - 1].first - vecr[rsize - 1].first) / 2.0);
            }
            if (vecr[rsize - 1].first < vecud[udsize - 1].first) {
                rightstrt = max(rightstrt, (double)(vecud[udsize - 1].first - vecr[rsize - 1].first));
            }
        }
    }
    vector<double> vec;
    vec.push_back(0);
    vec.push_back(botupst);
    vec.push_back(botstdown);
    vec.push_back(topdownst);
    vec.push_back(topstup);
    vec.push_back(leftrtst);
    vec.push_back(leftstlf);
    vec.push_back(rightlfst);
    vec.push_back(rightstrt);
    // double height = max(vecu[usize - 1].first, max(veclr[lrsize - 1].first, vecd[dsize - 1].first))
    //     - min(vecu[0].first, min(veclr[0].first, vecd[0].first));
    // double width = max(vecr[rsize - 1].first, max(vecl[lsize - 1].first, vecud[udsize - 1].first))
    //     - min(vecr[0].first, min(vecl[0].first, vecud[0].first));
    // REP(i, 0, vec.size()) {
    //     cout << vec[i] << " ";
    // }
    // cout << endl;
    double ans = inf;
    REP(i, 0, vec.size()) {
        double time = vec[i];
        if (time != -1 && time != inf) {
            double tmptop = -inf;
            double tmpbot = inf;
            if (usize != 0) {
                tmptop = max(tmptop, vecu[usize - 1].first + time);
                tmpbot = min(tmpbot, vecu[0].first + time);
            }
            if (lrsize != 0) {
                tmptop = max(tmptop, (double)veclr[lrsize - 1].first);
                tmpbot = min(tmpbot, (double)veclr[0].first);
            }
            if (dsize != 0) {
                tmptop = max(tmptop, vecd[dsize - 1].first - time);
                tmpbot = min(tmpbot, vecd[0].first - time);
            }
            double tmprt = -inf;
            double tmplf = inf;
            if (rsize != 0) {
                tmprt = max(tmprt, vecr[rsize - 1].first + time);
                tmplf = min(tmplf, vecr[0].first + time);
            }
            if (udsize != 0) {
                tmprt = max(tmprt, (double)vecud[udsize - 1].first);
                tmplf = min(tmplf, (double)vecud[0].first);
            }
            if (lsize != 0) {
                tmprt = max(tmprt, vecl[lsize - 1].first - time);
                tmplf = min(tmplf, vecl[0].first - time);
            }
            ans = min(ans, (tmptop - tmpbot) * (tmprt - tmplf));
        }
    }
    cout << ans << endl;
}


Measured memory_bytes: 5860