#include "bits/stdc++.h"

using namespace std;

using ll = long long;
constexpr int INF = numeric_limits<int>::max() / 2;

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

    int n;
    cin >> n;
    vector<ll> x(n), y(n);
    vector<string> d(n);
    int lcnt = 0, rcnt = 0, ucnt = 0, dcnt = 0;
    // UDLR の最大最小
    vector<ll> xmi(4, INF), ymi(4, INF), xma(4, -INF), yma(4, -INF);
    for (int i = 0; i < n; i++)
    {
        cin >> x[i] >> y[i] >> d[i];
        x[i] *= 2;
        y[i] *= 2;
        if (d[i] == "L")
        {
            lcnt++;
            xmi[0] = min(xmi[0], x[i]);
            xma[0] = max(xma[0], x[i]);
            ymi[0] = min(ymi[0], y[i]);
            yma[0] = max(yma[0], y[i]);
        }
        else if (d[i] == "R")
        {
            rcnt++;
            xmi[1] = min(xmi[1], x[i]);
            xma[1] = max(xma[1], x[i]);
            ymi[1] = min(ymi[1], y[i]);
            yma[1] = max(yma[1], y[i]);
        }
        else if (d[i] == "U")
        {
            ucnt++;
            xmi[2] = min(xmi[2], x[i]);
            xma[2] = max(xma[2], x[i]);
            ymi[2] = min(ymi[2], y[i]);
            yma[2] = max(yma[2], y[i]);
        }
        else
        {
            dcnt++;
            xmi[3] = min(xmi[3], x[i]);
            xma[3] = max(xma[3], x[i]);
            ymi[3] = min(ymi[3], y[i]);
            yma[3] = max(yma[3], y[i]);
        }
    }
    set<ll> cand = {0};
    if (lcnt)
    {
        if (xmi[1] < xmi[0])
        {
            cand.insert((xmi[0] - xmi[1]) / 2);
        }
        if (xma[1] < xma[0])
        {
            cand.insert((xma[0] - xma[1]) / 2);
        }
        if (xmi[2] < xmi[0])
        {
            cand.insert((xmi[0] - xmi[2]));
        }
        if (xma[2] < xma[0])
        {
            cand.insert((xma[0] - xma[2]));
        }
        if (xmi[3] < xmi[0])
        {
            cand.insert((xmi[0] - xmi[3]));
        }
        if (xma[3] < xma[0])
        {
            cand.insert((xma[0] - xma[3]));
        }
    }
    if (rcnt)
    {
        if (xmi[1] < xmi[2])
        {
            cand.insert((xmi[2] - xmi[1]));
        }
        if (xma[1] < xma[2])
        {
            cand.insert((xma[2] - xma[1]));
        }
        if (xmi[1] < xmi[3])
        {
            cand.insert((xmi[3] - xmi[1]));
        }
        if (xma[1] < xma[3])
        {
            cand.insert((xma[3] - xma[1]));
        }
    }
    if (ucnt)
    {
        if (ymi[2] < ymi[3])
        {
            cand.insert((ymi[3] - ymi[2]) / 2);
        }
        if (yma[2] < yma[3])
        {
            cand.insert((yma[3] - yma[2]) / 2);
        }
        if (ymi[2] < ymi[1])
        {
            cand.insert((ymi[1] - ymi[2]));
        }
        if (yma[2] < yma[1])
        {
            cand.insert((yma[1] - yma[2]));
        }
        if (ymi[2] < ymi[0])
        {
            cand.insert((ymi[0] - ymi[2]));
        }
        if (yma[2] < yma[0])
        {
            cand.insert((yma[0] - yma[2]));
        }
    }
    if (dcnt)
    {
        if (ymi[1] < ymi[3])
        {
            cand.insert((ymi[3] - ymi[1]));
        }
        if (yma[1] < yma[3])
        {
            cand.insert((yma[3] - yma[1]));
        }
        if (ymi[0] < ymi[3])
        {
            cand.insert((ymi[3] - ymi[0]));
        }
        if (yma[0] < yma[3])
        {
            cand.insert((yma[3] - yma[0]));
        }
    }
    ll ret = 1e18;
    for (auto v : cand)
    {
        // v秒後の位置
        ll xmin = INF, xmax = -INF, ymin = INF, ymax = -INF;
        for (int i = 0; i < n; i++)
        {
            if (d[i] == "U")
            {
                xmin = min(xmin, x[i]);
                xmax = max(xmax, x[i]);
                ymin = min(ymin, y[i] + v);
                ymax = max(ymax, y[i] + v);
            }
            else if (d[i] == "L")
            {
                xmin = min(xmin, x[i] - v);
                xmax = max(xmax, x[i] - v);
                ymin = min(ymin, y[i]);
                ymax = max(ymax, y[i]);
            }
            else if (d[i] == "R")
            {
                xmin = min(xmin, x[i] + v);
                xmax = max(xmax, x[i] + v);
                ymin = min(ymin, y[i]);
                ymax = max(ymax, y[i]);
            }
            else // D
            {
                xmin = min(xmin, x[i]);
                xmax = max(xmax, x[i]);
                ymin = min(ymin, y[i] - v);
                ymax = max(ymax, y[i] - v);
            }
        }
        ret = min(ret, (xmax - xmin) * (ymax - ymin));
    }
    cout << fixed << setprecision(10) << (double)ret / 4.0 << endl;
}


Measured memory_bytes: 7296