#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0, i##_len = (n); i < i##_len; i++)
#define reps(i, s, n) for(ll i = (s), i##_len = (n); i < i##_len; i++)
#define rrep(i, n) for(ll i = (n) - 1; i >= 0; i--)
#define rreps(i, e, n) for(ll i = (n) - 1; i >= (e); i--)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) ((ll)(x).size())
#define len(x) ((ll)(x).length())
#define endl "\n"

const ll inf = LONG_LONG_MAX / 2 - 1;
ll UDxmax = inf, Lxmax = inf, Rxmax = inf;
ll UDxmin = inf, Lxmin = inf, Rxmin = inf;
ll LRymax = inf, Uymax = inf, Dymax = inf;
ll LRymin = inf, Uymin = inf, Dymin = inf;

struct S {
    ll x, y;
};

double get_xmax(double t) {
    double ans = UDxmax;
    if (Lxmax != inf) ans = (ans == inf) ? Lxmax : max(ans, Lxmax - t);
    if (Rxmax != inf) ans = (ans == inf) ? Rxmax : max(ans, Rxmax + t);
    return ans;
}

double get_xmin(double t) {
    double ans = UDxmin;
    if (Lxmin != inf) ans = (ans == inf) ? Lxmin : min(ans, Lxmin - t);
    if (Rxmin != inf) ans = (ans == inf) ? Rxmin : min(ans, Rxmin + t);
    return ans;
}

double get_ymax(double t) {
    double ans = LRymax;
    if (Uymax != inf) ans = (ans == inf) ? Uymax : max(ans, Uymax + t);
    if (Dymax != inf) ans = (ans == inf) ? Dymax : max(ans, Dymax - t);
    return ans;
}

double get_ymin(double t) {
    double ans = LRymin;
    if (Uymin != inf) ans = (ans == inf) ? Uymin : min(ans, Uymin + t);
    if (Dymin != inf) ans = (ans == inf) ? Dymin : min(ans, Dymin - t);
    return ans;
}

double get_area(double t) {
    return (get_xmax(t) - get_xmin(t)) * (get_ymax(t) - get_ymin(t));
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    // ifstream in("input.txt");
    // cin.rdbuf(in.rdbuf());
    ll n;
    cin >> n;
    vector<S> R, L, U, D;
    rep(i, n) {
        ll tx, ty;
        char td;
        cin >> tx >> ty >> td;
        if (td == 'R') R.push_back((S){tx, ty});
        else if (td == 'L') L.push_back((S){tx, ty});
        else if (td == 'U') U.push_back((S){tx, ty});
        else if (td == 'D') D.push_back((S){tx, ty});
    }
    if ((sz(R) == 0) && (sz(L) == 0) && (sz(U) == 1) && (sz(D) == 1)) {
        printf("0\n");
        return 0;
    }
    if ((sz(U) == 0) && (sz(D) == 0) && (sz(R) == 1) && (sz(L) == 1)) {
        printf("0\n");
        return 0;
    }
    rep(i, sz(R)) {
        if ((Rxmax == inf) || (Rxmax < R[i].x)) {
            Rxmax = R[i].x;
        }
        if ((Rxmin == inf) || (Rxmin > R[i].x)) {
            Rxmin = R[i].x;
        }
        if ((LRymax == inf) || (LRymax < R[i].y)) {
            LRymax = R[i].y;
        }
        if ((LRymin == inf) || (LRymin > R[i].y)) {
            LRymin = R[i].y;
        }
    }
    rep(i, sz(L)) {
        if ((Lxmax == inf) || (Lxmax < L[i].x)) {
            Lxmax = L[i].x;
        }
        if ((Lxmin == inf) || (Lxmin > L[i].x)) {
            Lxmin = L[i].x;
        }
        if ((LRymax == inf) || (LRymax < L[i].y)) {
            LRymax = L[i].y;
        }
        if ((LRymin == inf) || (LRymin > L[i].y)) {
            LRymin = L[i].y;
        }
    }
    rep(i, sz(U)) {
        if ((UDxmax == inf) || (UDxmax < U[i].x)) {
            UDxmax = U[i].x;
        }
        if ((UDxmin == inf) || (UDxmin > U[i].x)) {
            UDxmin = U[i].x;
        }
        if ((Uymax == inf) || (Uymax < U[i].y)) {
            Uymax = U[i].y;
        }
        if ((Uymin == inf) || (Uymin > U[i].y)) {
            Uymin = U[i].y;
        }
    }
    rep(i, sz(D)) {
        if ((UDxmax == inf) || (UDxmax < D[i].x)) {
            UDxmax = D[i].x;
        }
        if ((UDxmin == inf) || (UDxmin > D[i].x)) {
            UDxmin = D[i].x;
        }
        if ((Dymax == inf) || (Dymax < D[i].y)) {
            Dymax = D[i].y;
        }
        if ((Dymin == inf) || (Dymin > D[i].y)) {
            Dymin = D[i].y;
        }
    }
    double low = 0, high = 1e9;
    rep(i, 10000) {
        double midlow = (low * 2 + high) / 3;
        double midhigh = (low + high * 2) / 3;
        if (get_area(midlow) > get_area(midhigh)) {
            low = midlow;
        }
        else {
            high = midhigh;
        }
    }
    printf("%.10f\n", get_area(low));
    return 0;
}


Measured memory_bytes: 2192