// #define DEBUGGING
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ALL(V) (V).begin(), (V).end()
#define ALLR(V) (V).rbegin(), (V).rend()

template <typename T> using V = vector<T>;
template <typename T> using VV = V<V<T>>;
template <typename T, typename U> using P = pair<T, U>;
using ll = int64_t;
using PLL = P<ll, ll>;

template <typename T> const T& var_min(const T &t) { return t; }
template <typename T> const T& var_max(const T &t) { return t; }
template <typename T, typename... Tail> const T& var_min(const T &t, const Tail&... tail) { return min(t, var_min(tail...)); }
template <typename T, typename... Tail> const T& var_max(const T &t, const Tail&... tail) { return max(t, var_max(tail...)); }
template <typename T, typename... Tail> void chmin(T &t, const Tail&... tail) { t = var_min(t, tail...); }
template <typename T, typename... Tail> void chmax(T &t, const Tail&... tail) { t = var_max(t, tail...); }
template <typename T> const T& clamp(const T &t, const T &low, const T &high) { return max(low, min(high, t)); }
template <typename T> void chclamp(T &t, const T &low, const T &high) { t = clamp(t, low, high); }

namespace init__ {

struct InitIO {
    InitIO() {
        cin.tie(nullptr);
        ios_base::sync_with_stdio(false);
        cout << fixed << setprecision(30);
    }
} init_io;

}

#ifdef DEBUGGING
#include "../debug.cpp"
#else
#define DEBUG(...) 0
#define DEBUG_SEPARATOR_LINE 0
#endif

template <typename T>
T make_v(T init) { return init; }

template <typename T, typename... Tail>
auto make_v(T init, size_t s, Tail... tail) {
#define rec make_v(init, tail...)
    return V<decltype(rec)>(s, rec);
#undef rec
}

const double inf = 5e17;

struct Points {
    double d_point, rd_point, oth_point, dir;
    bool d, rd, oth;
    V<double> changes;
    Points(ll d_point, ll rd_point, ll oth_point, ll dir)
        : d_point((double)d_point),
          rd_point((double)rd_point),
          oth_point((double)oth_point),
          d(d_point != inf && d_point != -inf),
          rd(rd_point != inf && rd_point != -inf),
          oth(oth_point != inf && oth_point != -inf),
          dir((double)dir)
    {
        auto comp = [&](double a, double b) {
            return dir == 1 ? a < b : a > b;
        };
        if(d   && rd  && comp(d_point,  rd_point))  changes.push_back(abs(rd_point - d_point) / 2);
        if(d   && oth && comp(d_point,  oth_point)) changes.push_back(abs(oth_point - d_point));
        if(rd  && oth && comp(rd_point, oth_point)) changes.push_back(abs(rd_point - oth_point));
    }

    double max(double t) {
        double ret = -inf;
        if(d)   chmax(ret, (double)(d_point + dir * t));
        if(rd)  chmax(ret, (double)(rd_point - dir * t));
        if(oth) chmax(ret, (double)(oth_point));
        return ret;
    }
    
    double min(double t) {
        double ret = inf;
        if(d)   chmin(ret, (double)(d_point + dir * t));
        if(rd)  chmin(ret, (double)(rd_point - dir * t));
        if(oth) chmin(ret, (double)(oth_point));
        return ret;
    }
};

int main() {
    double N;
    cin >> N;
    V<pair<double, double>> L, R, U, D;
    for(double i = 0; i < N; i++) {
        double x, y;
        cin >> x >> y;
        char c;
        cin >> c;
        (c == 'L' ? L :
         c == 'R' ? R :
         c == 'U' ? U : D).emplace_back(x, y);
    }

    double l_x_min = inf, r_x_min = inf, oth_x_min = inf;
    for(const auto &ele : L) chmin(l_x_min, ele.first);
    for(const auto &ele : R) chmin(r_x_min, ele.first);
    for(const auto &ele : U) chmin(oth_x_min, ele.first);
    for(const auto &ele : D) chmin(oth_x_min, ele.first);

    double l_x_max = -inf, r_x_max = -inf, oth_x_max = -inf;
    for(const auto &ele : L) chmax(l_x_max, ele.first);
    for(const auto &ele : R) chmax(r_x_max, ele.first);
    for(const auto &ele : U) chmax(oth_x_max, ele.first);
    for(const auto &ele : D) chmax(oth_x_max, ele.first);

    double d_y_min = inf, u_y_min = inf, oth_y_min = inf;
    for(const auto &ele : D) chmin(d_y_min, ele.second);
    for(const auto &ele : U) chmin(u_y_min, ele.second);
    for(const auto &ele : L) chmin(oth_y_min, ele.second);
    for(const auto &ele : R) chmin(oth_y_min, ele.second);

    double d_y_max = -inf, u_y_max = -inf, oth_y_max = -inf;
    for(const auto &ele : D) chmax(d_y_max, ele.second);
    for(const auto &ele : U) chmax(u_y_max, ele.second);
    for(const auto &ele : L) chmax(oth_y_max, ele.second);
    for(const auto &ele : R) chmax(oth_y_max, ele.second);
    
    V<Points> vp = { 
        Points(l_x_min, r_x_min, oth_x_min, -1), //  p_x_min
        Points(r_x_max, l_x_max, oth_x_max, 1),  //  p_x_max
        Points(d_y_min, u_y_min, oth_y_min, -1), //  p_y_min
        Points(u_y_max, d_y_max, oth_y_max, 1),  //  p_y_max
    };

    DEBUG(make_tuple(l_x_min, r_x_min, oth_x_min));
    DEBUG(make_tuple(l_x_max, r_x_max, oth_x_max));
    DEBUG(make_tuple(d_y_min, u_y_min, oth_y_min));
    DEBUG(make_tuple(d_y_max, u_y_max, oth_y_max));

    auto calc = [&](double t) {
        double a = vp[0].min(t), b = vp[1].max(t);
        double c = vp[2].min(t), d = vp[3].max(t);
        if(abs(a) == inf ||
           abs(b) == inf ||
           abs(c) == inf ||
           abs(d) == inf) return inf;
        
        double xlen = b - a;
        double ylen = d - c;
        return ylen * xlen;
    };

    double ans = inf;
    V<double> times = { 0, 1e9, };

    for(const auto &ele : vp) for(double t : ele.changes) times.push_back(t);
    sort(ALL(times));
    auto ite = unique(ALL(times));
    times.erase(ite, times.end());
    for(int i = 0; i < times.size() - 1; i++) {
        double t0 = times[i], t3 = times[i + 1];
        for(int j = 0; j < 10000; j++) {
            double t1 = t0 + (t3 - t0) / 3;
            double t2 = t0 + (t3 - t0) * 2 / 3;
            DEBUG(make_tuple(t0, t1, t2, t3));
            double f1 = calc(t1);
            double f2 = calc(t2);
            chmin(ans, f1, f2);
            DEBUG(make_tuple(f1, f2));
            if(f1 < f2) t3 = t2;
            else t0 = t1;
        }
    }

    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 2192