#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pli = pair<ll, int>;
using pil = pair<int, ll>;
using pdd = pair<double, double>;
using uint = unsigned int;
template <typename T>
using Graph = vector<vector<T>>;
const int MOD = 1e9 + 7;
const ld PI = acosl(-1);

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

    int N;
    cin >> N;

    // RLUD
    vector<vector<int>> v(4);
    int xmax = -1e8, xmin = 1e8;
    int ymax = -1e8, ymin = 1e8;
    for (int i = 0; i < N; ++i) {
        int x, y;
        char d;
        cin >> x >> y >> d;
        if (d == 'R') {
            v[0].push_back(x);
            ymax = max(ymax, y);
            ymin = min(ymin, y);
        }
        if (d == 'L') {
            v[1].push_back(x);
            ymax = max(ymax, y);
            ymin = min(ymin, y);
        }
        if (d == 'U') {
            v[2].push_back(y);
            xmax = max(xmax, x);
            xmin = min(xmin, x);
        }
        if (d == 'D') {
            v[3].push_back(y);
            xmax = max(xmax, x);
            xmin = min(xmin, x);
        }
    }

    for (int i = 0; i < 4; ++i)
        sort(v[i].begin(), v[i].end());

    vector<ld> check(1);
    // xmin
    {
        if (!v[0].empty()) {
            if (v[0][0] < xmin)
                check.push_back(xmin - v[0][0]);
            if (!v[1].empty() && v[0][0] < v[1][0])
                check.push_back((ld)(v[1][0] - v[0][0]) / 2);
        }
        if (!v[1].empty() && v[1][0] > xmin)
            check.push_back(v[1][0] - xmin);
    }
    // xmax
    {
        if (!v[0].empty()) {
            if (v[0].back() < xmax)
                check.push_back(xmax - v[0].back());
            if (!v[1].empty() && v[0].back() < v[1].back())
                check.push_back((ld)(v[1].back() - v[0].back()) / 2);
        }
        if (!v[1].empty() && v[1].back() > xmax)
            check.push_back(v[1].back() - xmax);
    }
    // ymin
    {
        if (!v[2].empty()) {
            if (v[2][0] < ymin)
                check.push_back(ymin - v[2][0]);
            if (!v[3].empty() && v[2][0] < v[3][0])
                check.push_back((ld)(v[3][0] - v[2][0]) / 2);
        }
        if (!v[3].empty() && v[3][0] > ymin)
            check.push_back(v[3][0] - ymin);
    }
    // ymax
    {
        if (!v[2].empty()) {
            if (v[2].back() < ymax)
                check.push_back(ymax - v[2].back());
            if (!v[3].empty() && v[2].back() < v[3].back())
                check.push_back((ld)(v[3].back() - v[2].back()) / 2);
        }
        if (!v[3].empty() && v[3].back() > ymax)
            check.push_back(v[3].back() - ymax);
    }

    auto f1 = [&](ld t) -> ld {
        ld l = xmin, r = xmax;
        if (!v[0].empty()) {
            l = min(v[0][0] + t, l);
            r = max(v[0].back() + t, r);
        }
        if (!v[1].empty()) {
            l = min(v[1][0] - t, l);
            r = max(v[1].back() - t, r);
        }
        return r - l;
    };

    auto f2 = [&](ld t) -> ld {
        ld l = ymin, r = ymax;
        if (!v[2].empty()) {
            l = min(v[2][0] + t, l);
            r = max(v[2].back() + t, r);
        }
        if (!v[3].empty()) {
            l = min(v[3][0] - t, l);
            r = max(v[3].back() - t, r);
        }
        return r - l;
    };

    ld ans = 1e18;
    for (auto i : check)
        ans = min(ans, f1(i) * f2(i));
    printf("%.15Lf\n", ans);

    return 0;
}


Measured memory_bytes: 4148