#include <bits/stdc++.h>

using namespace std;


struct point {
    double x;
    double y;
    double dx;
    double dy;
};
double top = 1000000000;

int N;
point x[100005];
double f(double time)
{
    double mnx=x[0].x+ time*(x[0].dx);
    double mxx=x[0].x+ time*(x[0].dx);
    double mny=x[0].y+ time*(x[0].dy);
    double mxy=x[0].y+ time*(x[0].dy);
    for (int i = 0; i < N; ++i)
    {
        mnx=min(mnx,x[i].x+ time*(x[i].dx));
        mxx=max(mxx,x[i].x+ time*(x[i].dx));
        mny=min(mny,x[i].y+ time*(x[i].dy));
        mxy=max(mxy,x[i].y+ time*(x[i].dy));
    }
    return  (mxx -mnx)*(mxy-mny);
}



int main()
{

    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout << setprecision(10) << fixed;
    cin>>N;
    for (int i = 0; i < N; ++i)
    {
        char t;
        cin>>x[i].x;
        cin>>x[i].y;
        cin>>t;
        if(t=='R')
            x[i].dx=1;
        else if (t=='L')
            x[i].dx=-1;
        else if (t=='U')
            x[i].dy=1;
        else
            x[i].dy=-1;
    }
    double l = 0;
    double r = top;
    double mn = top;
    for (int j = 0; j < 200; ++j)
    {

        auto m1 = (l + l + r) / 3.0;
        auto m1v = f(m1);
        mn = min(mn, m1v);
        auto m2 = (l + r + r) / 3.0;
        auto m2v = f(m2);
        if (m1v > m2v)
            l = m1;
        else
            r = m2;
    }
    cout << mn;
    return 0;
}