#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>

using namespace std;

int main(){
    int N;
    while(cin >> N){
        vector<double> times;
        vector<long long> x(N), y(N);
        vector<string> d(N);
        for(int i=0;i<N;i++) cin >> x[i] >> y[i] >> d[i];
        {
            int idxD = -1, idxS = -1, idxU = -1;
            for(int i=0;i<N;i++){
                if(d[i] == "R"){
                    if(idxD == -1 || x[i] < x[idxD]) idxD = i;
                } else if(d[i] == "L"){
                    if(idxU == -1 || x[i] < x[idxU]) idxU = i;
                } else {
                    if(idxS == -1 || x[i] < x[idxS]) idxS = i;
                }
            }
            if(idxD != -1 && idxU != -1 && x[idxD] < x[idxU]){
                times.push_back(0.5*(x[idxU] - x[idxD]));
            }
            if(idxD != -1 && idxS != -1 && x[idxD] < x[idxS]){
                times.push_back(x[idxS] - x[idxD]);
            }
            if(idxS != -1 && idxU != -1 && x[idxS] < x[idxU]){
                times.push_back(x[idxU] - x[idxS]);
            }
        }
        {
            int idxD = -1, idxS = -1, idxU = -1;
            for(int i=0;i<N;i++){
                if(d[i] == "L"){
                    if(idxD == -1 || x[i] > x[idxD]) idxD = i;
                } else if(d[i] == "R"){
                    if(idxU == -1 || x[i] > x[idxU]) idxU = i;
                } else {
                    if(idxS == -1 || x[i] > x[idxS]) idxS = i;
                }
            }
            if(idxD != -1 && idxU != -1 && x[idxU] < x[idxD]){
                times.push_back(0.5*(x[idxD] - x[idxU]));
            }
            if(idxD != -1 && idxS != -1 && x[idxS] < x[idxD]){
                times.push_back(x[idxD] - x[idxS]);
            }
            if(idxS != -1 && idxU != -1 && x[idxU] < x[idxS]){
                times.push_back(x[idxS] - x[idxU]);
            }
        }
        {
            int idxD = -1, idxS = -1, idxU = -1;
            for(int i=0;i<N;i++){
                if(d[i] == "U"){
                    if(idxD == -1 || y[i] < y[idxD]) idxD = i;
                } else if(d[i] == "D"){
                    if(idxU == -1 || y[i] < y[idxU]) idxU = i;
                } else {
                    if(idxS == -1 || y[i] < y[idxS]) idxS = i;
                }
            }
            if(idxD != -1 && idxU != -1 && y[idxD] < y[idxU]){
                times.push_back(0.5*(y[idxU] - y[idxD]));
            }
            if(idxD != -1 && idxS != -1 && y[idxD] < y[idxS]){
                times.push_back(y[idxS] - y[idxD]);
            }
            if(idxS != -1 && idxU != -1 && y[idxS] < y[idxU]){
                times.push_back(y[idxU] - y[idxS]);
            }
        }
        {
            int idxD = -1, idxS = -1, idxU = -1;
            for(int i=0;i<N;i++){
                if(d[i] == "D"){
                    if(idxD == -1 || y[i] > y[idxD]) idxD = i;
                } else if(d[i] == "U"){
                    if(idxU == -1 || y[i] > y[idxU]) idxU = i;
                } else {
                    if(idxS == -1 || y[i] > y[idxS]) idxS = i;
                }
            }
            if(idxD != -1 && idxU != -1 && y[idxU] < y[idxD]){
                times.push_back(0.5*(y[idxD] - y[idxU]));
            }
            if(idxD != -1 && idxS != -1 && y[idxS] < y[idxD]){
                times.push_back(y[idxD] - y[idxS]);
            }
            if(idxS != -1 && idxU != -1 && y[idxU] < y[idxS]){
                times.push_back(y[idxS] - y[idxU]);
            }
        }
        vector<int> dx(N, 0), dy(N, 0);
        for(int i=0;i<N;i++){
            if(d[i] == "L") dx[i] = -1;
            if(d[i] == "R") dx[i] = 1;
            if(d[i] == "U") dy[i] = 1;
            if(d[i] == "D") dy[i] = -1;
        }
        auto calcArea = [&](double t){
            double minX = 1e20, maxX = -1e20, minY = 1e20, maxY = -1e20;
            for(int j=0;j<N;j++){
                double cx = x[j] + t * dx[j];
                double cy = y[j] + t * dy[j];
                minX = min(cx, minX);
                maxX = max(cx, maxX);
                minY = min(cy, minY);
                maxY = max(cy, maxY);
            }                
            return (maxX - minX) * (maxY - minY);
        };
        double res = calcArea(0);
        for(auto& t : times){
            res = min(res, calcArea(t));
        }
        printf("%.9lf\n", res);
    }
}

Measured memory_bytes: 8832