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

struct Benri { Benri() { std::cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(12);}} benri;

using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using vll = vector<long long>;
using pll = pair<ll, ll>;
using ull = unsigned long long;

template <typename T> using PQ = priority_queue<T>;
template <typename T> using minPQ = priority_queue<T, vector<T>, greater<T>>;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define mp make_pair
#define F first
#define S second

template<class T>bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; }

constexpr long long MOD = 1000000007;
constexpr long long MOD2 = 998244353;
constexpr double EPS = 1e-10;
//constexpr int INF = 1001001001;
constexpr ll INF = 1001001001001001001ll;


int N;
vector<double> x, y;
vector<char> d;

//時刻tでの面積　O(N)　イベントがそう多くないので十分間に合う
double area(double t) {
    double xmi = INF, xma = -INF, ymi = INF, yma = -INF;
    for (int i = 0; i < N; ++i) {
        double cx, cy;
        if (d[i] == 'L') cx = x[i] - t, cy = y[i];
        else if (d[i] == 'R') cx = x[i] + t, cy = y[i];
        else if (d[i] == 'U') cx = x[i], cy = y[i] + t;
        else cx = x[i], cy = y[i] - t;
        chmin(xmi, cx);
        chmax(xma, cx);
        chmin(ymi, cy);
        chmax(yma, cy);
    }
    return (xma - xmi) * (yma - ymi);
}


double solve() {
    vector<double> alt;
    alt.push_back(0);

    // 左
    {
        double mi1 = INF; // L
        double mi2 = INF; // R
        double mi3 = INF; // UD
        for (int i = 0; i < N; ++i) {
            if (d[i] == 'L') chmin(mi1, x[i]);
            else if (d[i] == 'R') chmin(mi2, x[i]);
            else chmin(mi3, x[i]);
        }
        if (mi1 < INF && mi2 < INF) alt.push_back( abs(mi1 - mi2) / 2 );
        if (mi1 < INF && mi3 < INF) alt.push_back( abs(mi1 - mi3) );
        if (mi2 < INF && mi3 < INF) alt.push_back( abs(mi2 - mi3) );
    }
    
    // 右
    {
        double ma1 = -INF; // L
        double ma2 = -INF; // R
        double ma3 = -INF; // UD
        for (int i = 0; i < N; ++i) {
            if (d[i] == 'L') chmax(ma1, x[i]);
            else if (d[i] == 'R') chmax(ma2, x[i]);
            else chmax(ma3, x[i]);
        }
        if (ma1 > -INF && ma2 > -INF) alt.push_back( abs(ma1 - ma2) / 2 );
        if (ma1 > -INF && ma3 > -INF) alt.push_back( abs(ma1 - ma3) );
        if (ma2 > -INF && ma3 > -INF) alt.push_back( abs(ma2 - ma3) );
    }
    
    // 下
    {
        double mi1 = INF; // D
        double mi2 = INF; // U
        double mi3 = INF; // 
        for (int i = 0; i < N; ++i) {
            if (d[i] == 'D') chmin(mi1, y[i]);
            else if (d[i] == 'U') chmin(mi2, y[i]);
            else chmin(mi3, y[i]);
        }
        if (mi1 < INF && mi2 < INF) alt.push_back( abs(mi1 - mi2) / 2 );
        if (mi1 < INF && mi3 < INF) alt.push_back( abs(mi1 - mi3) );
        if (mi2 < INF && mi3 < INF) alt.push_back( abs(mi2 - mi3) );
    }
    // 上
    {
        double ma1 = -INF; // U
        double ma2 = -INF; // D
        double ma3 = -INF; // 
        for (int i = 0; i < N; ++i) {
            if (d[i] == 'D') chmax(ma1, y[i]);
            else if (d[i] == 'U') chmax(ma2, y[i]);
            else chmax(ma3, y[i]);
        }
        if (ma1 > -INF && ma2 > -INF) alt.push_back( abs(ma1 - ma2) / 2 );
        if (ma1 > -INF && ma3 > -INF) alt.push_back( abs(ma1 - ma3) );
        if (ma2 > -INF && ma3 > -INF) alt.push_back( abs(ma2 - ma3) );
    }

    sort(all(alt));
    alt.erase(unique(all(alt)), alt.end());
    double res = INF;
    
    for (int i = 0; i < alt.size(); ++i) {
        double tmp = area(alt[i]);
        chmin(res, tmp);
    }
    
    return res;
}

int main() {
    cin >> N;
    x.resize(N), y.resize(N), d.resize(N);
    for (int i = 0; i < N; ++i) cin >> x[i] >> y[i] >> d[i];

    double res = solve();

    cout <<  res << endl;
}

Measured memory_bytes: 1920