#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <limits.h>
#include <math.h>
#include <assert.h>
typedef int64_t ll;
typedef uint64_t ull;
int acs(const void *a, const void *b){return *(double*)a > *(double*)b ? 1 : -1;} /* 1,2,3,4.. */
int des(const void *a, const void *b){return *(double*)b - *(double*)a;} /* 8,7,6,5.. */
#define min(a,b) (a < b ? a: b)
#define max(a,b) (a > b ? a: b)

#define MAXN (200001)
#define MOD (1000000007)

double pos(ll n, double t)
{
    if(n == INT64_MAX) return 1e10;
    if(n == INT64_MIN) return -1e10;
    return (double)n + t;
}

ll l[MAXN];
double et[100];
int main(void)
{
    ll n;
    scanf("%ld",&n);

    ll xfmax=INT64_MIN,xfmin=INT64_MAX,xpmax=INT64_MIN,xpmin=INT64_MAX,xmmax=INT64_MIN,xmmin=INT64_MAX;
    ll yfmax=INT64_MIN,yfmin=INT64_MAX,ypmax=INT64_MIN,ypmin=INT64_MAX,ymmax=INT64_MIN,ymmin=INT64_MAX;
    for(int i=0;i<n;i++)
    {
        ll x,y;
        char d;
        scanf("%ld %ld %c",&x,&y,&d);

        switch(d)
        {
            case 'R':
            xpmax = max(xpmax,x);
            xpmin = min(xpmin,x);
            yfmax = max(yfmax,y);
            yfmin = min(yfmin,y);
            break;
            case 'L':
            xmmax = max(xmmax,x);
            xmmin = min(xmmin,x);
            yfmax = max(yfmax,y);
            yfmin = min(yfmin,y);
            break;
            case 'U':
            xfmax = max(xfmax,x);
            xfmin = min(xfmin,x);
            ypmax = max(ypmax,y);
            ypmin = min(ypmin,y);
            break;
            case 'D':
            xfmax = max(xfmax,x);
            xfmin = min(xfmin,x);
            ymmax = max(ymmax,y);
            ymmin = min(ymmin,y);
            break;
        }
    }
    et[0]= 0;
    int en = 1;
    if(xfmin!=INT64_MAX&&xpmin!=INT64_MAX)
    {
        if(xfmin>xpmin)
        {
            et[en] = (double)(xfmin-xpmin);
            en++;
        }
    }
    if(xfmin!=INT64_MAX&&xmmin!=INT64_MAX)
    {
        if(xfmin<xmmin)
        {
            et[en] = (double)(xmmin-xfmin);
            en++;
        }
    }
    if(xmmin!=INT64_MAX&&xpmin!=INT64_MAX)
    {
        if(xmmin>xpmin)
        {
            et[en] = (double)(xmmin-xpmin)/2.0;
            en++;
        }
    }
    if(xfmax!=INT64_MIN&&xpmax!=INT64_MIN)
    {
        if(xfmax>xpmax)
        {
            et[en] = (double)(xfmax-xpmax);
            en++;
        }
    }
    if(xfmax!=INT64_MIN&&xmmax!=INT64_MIN)
    {
        if(xfmax<xmmax)
        {
            et[en] = (double)(xmmax-xfmax);
            en++;
        }
    }
    if(xmmax!=INT64_MIN&&xpmax!=INT64_MIN)
    {
        if(xmmax>xpmax)
        {
            et[en] = (double)(xmmax-xpmax)/2.0;
            en++;
        }
    }
    if(yfmin!=INT64_MAX&&ypmin!=INT64_MAX)
    {
        if(yfmin>ypmin)
        {
            et[en] = (double)(yfmin-ypmin);
            en++;
        }
    }
    if(yfmin!=INT64_MAX&&ymmin!=INT64_MAX)
    {
        if(yfmin<ymmin)
        {
            et[en] = (double)(ymmin-yfmin);
            en++;
        }
    }
    if(ymmin!=INT64_MAX&&ypmin!=INT64_MAX)
    {
        if(ymmin>ypmin)
        {
            et[en] = (double)(ymmin-ypmin)/2.0;
            en++;
        }
    }
    if(yfmax!=INT64_MIN&&ypmax!=INT64_MIN)
    {
        if(yfmax>ypmax)
        {
            et[en] = (double)(yfmax-ypmax);
            en++;
        }
    }
    if(yfmax!=INT64_MIN&&ymmax!=INT64_MIN)
    {
        if(yfmax<ymmax)
        {
            et[en] = (double)(ymmax-yfmax);
            en++;
        }
    }
    if(ymmax!=INT64_MIN&&ypmax!=INT64_MIN)
    {
        if(ymmax>ypmax)
        {
            et[en] = (double)(ymmax-ypmax)/2.0;
            en++;
        }
    }

    double ans = 1e18;
    for(int i=0;i<en;i++)
    {
        double xmin = 1e10;
        xmin = min(xmin,pos(xfmin,0));
        xmin = min(xmin,pos(xpmin,et[i]));
        xmin = min(xmin,pos(xmmin,-et[i]));
        double xmax = -1e10;
        xmax = max(xmax,pos(xfmax,0));
        xmax = max(xmax,pos(xpmax,et[i]));
        xmax = max(xmax,pos(xmmax,-et[i]));
        double ymin = 1e10;
        ymin = min(ymin,pos(yfmin,0));
        ymin = min(ymin,pos(ypmin,et[i]));
        ymin = min(ymin,pos(ymmin,-et[i]));
        double ymax = -1e10;
        ymax = max(ymax,pos(yfmax,0));
        ymax = max(ymax,pos(ypmax,et[i]));
        ymax = max(ymax,pos(ymmax,-et[i]));
        double score = (xmax-xmin)*(ymax-ymin);
        ans = min(ans,score);
    }

    
    printf("%lf\n",ans);

    return 0;
}


Measured memory_bytes: 128