#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <numeric>
#include <utility>
#include <tuple>

#define REP(i, a, b) for (int i = int(a); i < int(b); i++)
using namespace std;
using ll = long long int;
using P = pair<ll, ll>;

// clang-format off
#ifdef _DEBUG_
#define dump(...) do{ cerr << __LINE__ << ":\t" << #__VA_ARGS__ << " = "; PPPPP(__VA_ARGS__); cerr << endl; } while(false)
template<typename T> void PPPPP(T t) { cerr << t; }
template<typename T, typename... S> void PPPPP(T t, S... s) { cerr << t << ", "; PPPPP(s...); }
#else
#define dump(...) do{ } while(false)
#endif
template<typename T> vector<T> make_v(size_t a, T b) { return vector<T>(a, b); }
template<typename... Ts> auto make_v(size_t a, Ts... ts) { return vector<decltype(make_v(ts...))>(a, make_v(ts...)); }
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> void print(T a) { cout << a << endl; }
template<typename T, typename... Ts> void print(T a, Ts... ts) { cout << a << ' '; print(ts...); }
template<typename T> istream &operator,(istream &in, T &t) { return in >> t; }
// clang-format on

#include <iomanip>

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int n;
    cin, n;
    vector<ll> x(n), y(n);
    vector<char> d(n);
    vector<double> tm;
    tm.push_back(0);
    
    {
        const ll inf = 1LL << 60;
        ll xl1 = inf, xr1 = -inf, yu1 = -inf, yd1 = inf;
        ll xl2 = -inf, xr2 = inf, yu2 = inf, yd2 = -inf;

        ll xmin = inf, xmax = -inf;
        ll ymin = inf, ymax = -inf;
        REP(i, 0, n) {
            cin, x[i], y[i], d[i];

            if (d[i] == 'U') {
                chmax(yu1, y[i]);
                chmin(yu2, y[i]);
                chmax(xmax, x[i]);
                chmin(xmin, x[i]);
            }
            if (d[i] == 'D') {
                chmin(yd1, y[i]);
                chmax(yd2, y[i]);
                chmax(xmax, x[i]);
                chmin(xmin, x[i]);
            }
            if (d[i] == 'R') {
                chmax(xr1, x[i]);
                chmin(xr2, x[i]);
                chmax(ymax, y[i]);
                chmin(ymin, y[i]);
            }
            if (d[i] == 'L') {
                chmin(xl1, x[i]);
                chmax(xl2, x[i]);
                chmax(ymax, y[i]);
                chmin(ymin, y[i]);
            }
        }

        if (ymin != inf) {
            if (yd1 != inf) {
                tm.push_back(max(0LL, yd1 - ymin));
                tm.push_back(max(0LL, yd1 - ymax));
            }
            if (yu1 != -inf) {
                tm.push_back(max(0LL, ymax - yu1));
                tm.push_back(max(0LL, ymin - yu1));
            }
            if (yd2 != -inf) {
                tm.push_back(max(0LL, yd2 - ymin));
                tm.push_back(max(0LL, yd2 - ymax));
            }
            if (yu2 != inf) {
                tm.push_back(max(0LL, ymax - yu2));
                tm.push_back(max(0LL, ymin - yu2));
            }
        }
        if (yd1 != inf && yu1 != -inf) {
            tm.push_back(max(0.0, (yd1 - yu1) / 2.0));
        }
        if (yd2 != -inf && yu2 != inf) {
            tm.push_back(max(0.0, (yd2 - yu2) / 2.0));
        }
        if (yd1 != inf && yu2 != inf) {
            tm.push_back(max(0.0, (yd2 - yu1) / 2.0));
        }
        if (yd2 != -inf && yu1 != -inf) {
            tm.push_back(max(0.0, (yd1 - yu2) / 2.0));
        }

        if (xmin != inf) {
            if (xr1 != -inf) {
                tm.push_back(max(0LL, xmin - xr1));
                tm.push_back(max(0LL, xmax - xr1));
            }
            if (xl1 != inf) {
                tm.push_back(max(0LL, xl1 - xmin));
                tm.push_back(max(0LL, xl1 - xmax));
            }
            if (xr2 != inf) {
                tm.push_back(max(0LL, xmin - xr2));
                tm.push_back(max(0LL, xmax - xr2));
            }
            if (xl2 != -inf) {
                tm.push_back(max(0LL, xl2 - xmin));
                tm.push_back(max(0LL, xl2 - xmax));
            }
        }
        if (xl1 != inf && xr1 != -inf) {
            tm.push_back(max(0.0, (xl1 - xr1) / 2.0));
        }
        if (xl2 != -inf && xr2 != inf) {
            tm.push_back(max(0.0, (xl2 - xr2) / 2.0));
        }
        if (xl1 != inf && xr2 != inf) {
            tm.push_back(max(0.0, (xl2 - xr1) / 2.0));
        }
        if (xl2 != -inf && xr1 != -inf) {
            tm.push_back(max(0.0, (xl1 - xr2) / 2.0));
        }
    }

    const double inf = 1e+19;
    double ans = inf;

    for (double t : tm) {
        double xmin = inf, xmax = -inf;
        double ymin = inf, ymax = -inf;

        REP(i, 0, n) {
            double curx = x[i], cury = y[i];
            if (d[i] == 'U') {
                cury += t;
            }
            if (d[i] == 'D') {
                cury -= t;
            }
            if (d[i] == 'R') {
                curx += t;
            }
            if (d[i] == 'L') {
                curx -= t;
            }

            chmax(xmax, curx);
            chmax(ymax, cury);
            chmin(xmin, curx);
            chmin(ymin, cury);
        }
        dump(t, (ymax - ymin) * (xmax - xmin));
        chmin(ans, (ymax - ymin) * (xmax - xmin));
    }

    cout << fixed << setprecision(15) << ans << endl;

    return 0;
}


Measured memory_bytes: 4764