#include <bits/stdc++.h>
#define all(vec) vec.begin(), vec.end()
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
constexpr ll INF = (1LL << 30) - 1LL;
constexpr ll LINF = (1LL << 60) - 1LL;
constexpr double eps = 1e-9;
constexpr ll MOD = 1000000007LL;
template <typename T>
bool chmin(T& a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
};
template <typename T>
bool chmax(T& a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
};
template <typename T>
ostream& operator<<(ostream& os, vector<T> v) {
    for(int i = 0; i < v.size(); i++) {
        os << v[i] << (i + 1 == v.size() ? "\n" : " ");
    }
    return os;
}
template <typename T>
vector<T> make_v(size_t a) {
    return vector<T>(a);
}
template <typename T, typename... Ts>
auto make_v(size_t a, Ts... ts) {
    return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...));
}
template <typename T, typename V>
typename enable_if<is_class<T>::value == 0>::type fill_v(T& t, const V& v) {
    t = v;
}
template <typename T, typename V>
typename enable_if<is_class<T>::value != 0>::type fill_v(T& t, const V& v) {
    for(auto& e : t) {
        fill_v(e, v);
    }
};
int n;
vector<double> x, y;
vector<char> d;
double calc(double t) {
    double xmi = LINF, ymi = LINF, xma = -LINF, yma = -LINF;
    for(int i = 0; i < n; i++) {
        double xx = x[i], yy = y[i];
        if(d[i] == 'L') {
            xx -= t;
        } else if(d[i] == 'R') {
            xx += t;
        } else if(d[i] == 'U') {
            yy += t;
        } else {
            yy -= t;
        }
        chmin(xmi, xx);
        chmax(xma, xx);
        chmin(ymi, yy);
        chmax(yma, yy);
    }
    return (xma - xmi) * (yma - ymi);
}
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> n;
    x.resize(n);
    y.resize(n);
    d.resize(n);
    double lmi = LINF, lma = -LINF, rmi = LINF, rma = -LINF, cmi = LINF,
           cma = -LINF;
    for(int i = 0; i < n; i++) {
        cin >> x[i] >> y[i] >> d[i];
        if(d[i] == 'R') {
            chmin(rmi, x[i]);
            chmax(rma, x[i]);
        } else if(d[i] == 'L') {
            chmin(lmi, x[i]);
            chmax(lma, x[i]);
        } else {
            chmin(cmi, x[i]);
            chmax(cma, x[i]);
        }
    }
    vector<double> vl{lmi, lma}, vr{rmi, rma}, vc{cmi, cma};
    vector<double> v;
    for(int i = 0; i < 2; i++) {
        for(int j = 0; j < 2; j++) {
            if(vl[i] > vr[j] && rmi != LINF && lmi != LINF) {
                v.push_back((vl[i] - vr[j]) / 2.0);
            }
            if(vl[i] > vc[j] && lmi != LINF && cmi != LINF) {
                v.push_back(vl[i] - vc[j]);
            }
            if(vc[i] > vr[j] && rmi != LINF && cmi != LINF) {
                v.push_back(vc[i] - vr[j]);
            }
        }
    }
    lmi = LINF, lma = -LINF, rmi = LINF, rma = -LINF, cmi = LINF, cma = -LINF;
    for(int i = 0; i < n; i++) {
        if(d[i] == 'U') {
            chmin(rmi, y[i]);
            chmax(rma, y[i]);
        } else if(d[i] == 'D') {
            chmin(lmi, y[i]);
            chmax(lma, y[i]);
        } else {
            chmin(cmi, y[i]);
            chmax(cma, y[i]);
        }
    }
    vl = {lmi, lma}, vr = {rmi, rma}, vc = {cmi, cma};
    for(int i = 0; i < 2; i++) {
        for(int j = 0; j < 2; j++) {
            if(vl[i] > vr[j] && rmi != LINF && lmi != LINF) {
                v.push_back((vl[i] - vr[j]) / 2.0);
            }
            if(vl[i] > vc[j] && lmi != LINF && cmi != LINF) {
                v.push_back(vl[i] - vc[j]);
            }
            if(vc[i] > vr[j] && rmi != LINF && cmi != LINF) {
                v.push_back(vc[i] - vr[j]);
            }
        }
    }
    sort(all(v));
    v.erase(unique(all(v)), v.end());
    double ans = calc(0);
    for(auto& t : v) {
        chmin(ans, calc(t));
    }
    printf("%.10lf\n", ans);
}


Measured memory_bytes: 1920