#include <bits/stdc++.h>

#define REP(i,n) for (int i=0;i<(n);++i)

using namespace std;

template <class T, class U> void amax(T& x, U y) {if (x < y) x = y;}
template <class T, class U> void amin(T& x, U y) {if (x > y) x = y;}

template <class T>
struct polynomial {

    vector<T> a;
    
    polynomial(const vector<T> &a) : a(a) {
    }

    polynomial operator+(const polynomial<T> p) {
        int d0 = a.size() - 1;
        int d1 = p.a.size() - 1;
        int d = max(d0, d1);
        vector<T> b(d + 1);
        for (int i = 0; i <= d0; ++i) {
            b[i] += a[i];
        }
        for (int i = 0; i <= d1; ++i) {
            b[i] += p.a[i];
        }
        while (!b.empty() && b.back() == 0) {
            b.pop_back();
        }
        if (b.empty()) {
            b = {0};
        }
        return b;
    }

    polynomial operator-(const polynomial<T> p) {
        int d0 = a.size() - 1;
        int d1 = p.a.size() - 1;
        int d = max(d0, d1);
        vector<T> b(d + 1);
        for (int i = 0; i <= d0; ++i) {
            b[i] += a[i];
        }
        for (int i = 0; i <= d1; ++i) {
            b[i] -= p.a[i];
        }
        while (!b.empty() && b.back() == 0) {
            b.pop_back();
        }
        if (b.empty()) {
            b = {0};
        }
        return b;
    }

    polynomial operator*(const polynomial<T> p) {
        int d0 = a.size() - 1;
        int d1 = p.a.size() - 1;
        int d = d0 + d1;
        vector<T> b(d + 1);
        for (int i = 0; i <= d0; ++i) {
            for (int j = 0; j <= d1; ++j) {
                b[i + j] += a[i] * p.a[j];
            }
        }
        return b;
    }
};

template <class T>
polynomial<T> differentiate(const polynomial<T> p) {
    int d = p.a.size() - 1;
    if (d == 0) {
        return polynomial<T>({0});
    }
    vector<T> b(d);
    for (int i = 1; i <= d; ++i) {
        b[i - 1] = i * p.a[i];
    }
    return b;
}

int code(char c) {
    if (c == 'R') {
        return 0;
    } else if (c == 'L') {
        return 1;
    } else if (c == 'U') {
        return 2;
    } else if (c == 'D') {
        return 3;
    } else {
        assert(0);
    }
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    using Poly = polynomial<double>;

    constexpr double inf = numeric_limits<double>::infinity();

    int N;
    cin >> N;

    vector<double> x_min(4, inf), x_max(4, -inf), y_min(4, inf), y_max(4, -inf);
    REP(_, N) {
        double x, y;
        char d;
        cin >> x >> y >> d;
        int i = code(d);
        amin(x_min[i], x);
        amax(x_max[i], x);
        amin(y_min[i], y);
        amax(y_max[i], y);
    }

    double x_max_ = max(x_max[2], x_max[3]);
    double x_min_ = min(x_min[2], x_min[3]);
    double y_max_ = max(y_max[0], y_max[1]);
    double y_min_ = min(y_min[0], y_min[1]);

    function<double(double)> W = [&](double t) {
        double R = max({ x_max[0] + t, x_max[1] - t, x_max_ });
        double L = min({ x_min[0] + t, x_min[1] - t, x_min_ });
        return R - L;
    };
    function<double(double)> H = [&](double t) {
        double U = max({ y_max[2] + t, y_max[3] - t, y_max_ });
        double D = min({ y_min[2] + t, y_min[3] - t, y_min_ });
        return U - D;
    };
    function<double(double)> WH = [&](double t) {
        return W(t) * H(t);
    };

    vector<double> ts = {
        0,
        (x_max[1] - x_max[0]) / 2,
        (x_min[1] - x_min[0]) / 2,
        (y_max[3] - y_max[2]) / 2,
        (y_min[3] - y_min[2]) / 2,
        x_max_ - x_max[0],
        -(x_max_ - x_max[1]),
        x_min_ - x_min[0],
        -(x_min_ - x_min[1]),
        y_max_ - y_max[2],
        -(y_max_ - y_max[3]),
        y_min_ - y_min[2],
        -(y_min_ - y_min[3]),
    };

    for (Poly R : {Poly({x_max[0], 1}), Poly({x_max[1], -1}), Poly({x_max_})}) {
        for (Poly L : {Poly({x_min[0], 1}), Poly({x_min[1], -1}), Poly({x_min_})}) {
            for (Poly U : {Poly({y_max[2], 1}), Poly({y_max[3], -1}), Poly({y_max_})}) {
                for (Poly D : {Poly({y_min[2], 1}), Poly({y_min[3], -1}), Poly({y_min_})}) {
                    Poly p = differentiate((R - L) * (U - D));
                    if (p.a.size() == 2) {
                        double t = -p.a[0] / p.a[1];
                        ts.push_back(t);
                    }
                }
            }
        }
    }

    double result = inf;
    for (double t : ts) {
        if (t >= 0) {
            amin(result, WH(t));
        }
    }

    cout << fixed << result << endl;

    return 0;
}


Measured memory_bytes: 3844