#include<iostream>
#include<iomanip>
#include<vector>
#include<string>
#include<cstring>
#include<map>
#include<set>
#include<queue>
#include<stack>
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<climits>
#include<fstream>

#define MAX_N (100000+10)
#define MOD (1000000007)

using namespace std;

typedef long long int Int;

constexpr Int TEN(int n) { return n == 0 ? 1 : 10 * TEN(n-1); }

Int N;
const double inf = 1e18;
double X[MAX_N],Y[MAX_N],Dx[MAX_N],Dy[MAX_N];

double func(double a) {
    double minx = inf,maxx = -inf, miny = inf,maxy = -inf;

    for(int i = 0;i < N;i++) {
        double nx = X[i] + a * Dx[i];
        double ny = Y[i] + a * Dy[i];

        minx = min(minx,nx);
        maxx = max(maxx,nx);
        miny = min(miny,ny);
        maxy = max(maxy,ny);
    }
    
    return (maxx - minx) * (maxy - miny);
}

double solve(double l, double r) {
    double ans = inf;
    int num = 300;
    while(num--) {
        double left = l + (r - l) / 3;
        double right = r - (r - l) / 3;

        double f1 = func(left);
        double f2 = func(right);

        ans = min(ans,min(f1,f2));

        if(f1 < f2)
            r = right;
        else
            l = left;
    }

    return ans;
}

int main(void) {
    cin>>N;
    char s;

    for(int i = 0;i < N;i++) {
        cin>>X[i]>>Y[i]>>s;
        if(s == 'R')
            Dx[i] = 1;
        else if(s == 'L')
            Dx[i] = -1;
        else if(s == 'U')
            Dy[i] = 1;
        else
            Dy[i] = -1;
    }

    printf("%f\n",solve(0, 1e9));

    return 0;
}
