#include<bits/stdc++.h>
using namespace std;
#define ll long long
struct Point
{
    double x,y;
    int dx,dy;
};
double simulate(vector<Point> points,double t)
{
    double maxX=-1e18,maxY=-1e18,minX=1e18,minY=1e18;
    for(int i=0;i<points.size();++i)
    {
        points[i].x += points[i].dx * t;
        points[i].y += points[i].dy * t;
        maxX = max(maxX,points[i].x);
        maxY = max(maxY,points[i].y);
        minX = min(minX,points[i].x);
        minY = min(minY,points[i].y);
    }
    return (maxY-minY)*(maxX-minX);
}
int main()
{
    int n;
    cin>>n;
    vector<Point> points(n);
    for(int i=0;i<n;++i)
    {
        cin>>points[i].x>>points[i].y;
        char ch;
        cin>>ch;
        if(ch == 'U')
        {
            points[i].dx = 0, points[i].dy = 1;
        }else if(ch == 'D')
        {
            points[i].dx = 0, points[i].dy = -1;
        }else if(ch == 'L')
        {
            points[i].dx = -1, points[i].dy = 0;
        }
        else if(ch == 'R')
        {
            points[i].dx = 1, points[i].dy = 0;
        }
    }
    double l = 0, r = 1e8;
    while(l+1e-8<r){
        double m1=l+(r-l)/3;
        double m2=r-(r-l)/3;
        if(-simulate(points, m1)>-simulate(points, m2))
            r=m2;
        else
            l=m1;
    }
    printf("%.9f\n",simulate(points,l));
}