#include <iostream>
#include <iomanip>
#include <vector>
#define INF 200000000
#define NINF (-200000000)


double info[2][2][3]; // xy, minmax, + 0 -
using namespace std;
int main() {
    int N;
    double x[100000], y[100000];
    char d[100000];
    cin >> N;
    for (int i=0; i<N; i++) cin >> x[i] >> y[i] >> d[i];
    for (int i=0; i<2; i++) {
        for (int j=0; j<3; j++) {
            info[i][0][j] = INF;
            info[i][1][j] = NINF;
        }
    }

    for (int i=0; i<N; i++) {
        switch (d[i]) {
            case 'L': // x-, y0
                if (info[0][0][2] > x[i]) info[0][0][2] = x[i];
                if (info[0][1][2] < x[i]) info[0][1][2] = x[i];
                if (info[1][0][1] > y[i]) info[1][0][1] = y[i];
                if (info[1][1][1] < y[i]) info[1][1][1] = y[i];
                break;
            case 'R': // x+, y0
                if (info[0][0][0] > x[i]) info[0][0][0] = x[i];
                if (info[0][1][0] < x[i]) info[0][1][0] = x[i];
                if (info[1][0][1] > y[i]) info[1][0][1] = y[i];
                if (info[1][1][1] < y[i]) info[1][1][1] = y[i];
                break;
            case 'U': // x0, y+
                if (info[0][0][1] > x[i]) info[0][0][1] = x[i];
                if (info[0][1][1] < x[i]) info[0][1][1] = x[i];
                if (info[1][0][0] > y[i]) info[1][0][0] = y[i];
                if (info[1][1][0] < y[i]) info[1][1][0] = y[i];
                break;
            case 'D': // x0, y-
                if (info[0][0][1] > x[i]) info[0][0][1] = x[i];
                if (info[0][1][1] < x[i]) info[0][1][1] = x[i];
                if (info[1][0][2] > y[i]) info[1][0][2] = y[i];
                if (info[1][1][2] < y[i]) info[1][1][2] = y[i];
                break;
        }
    }
    vector<double> times;
    for (int i=0; i<2; i++) {
        for (int j=0; j<2; j++) {
            if (info[i][j][2] != INF && info[i][j][2] != NINF && info[i][j][0] != INF && info[i][j][0] != NINF)
                times.push_back((info[i][j][2] - info[i][j][0])/2);
            if (info[i][j][1] != INF && info[i][j][1] != NINF && info[i][j][0] != INF && info[i][j][0] != NINF)
            times.push_back((info[i][j][1] - info[i][j][0]));
            if (info[i][j][2] != INF && info[i][j][2] != NINF && info[i][j][1] != INF && info[i][j][1] != NINF)
            times.push_back((info[i][j][2] - info[i][j][1]));
        }
    }

    // double info[2][2][3]; // xy, minmax, + 0 -
    double minS = -1;
    double minT = -1;
    times.push_back(0);
/*
    for (int i=0; i<2; i++) {
        for (int j=0; j<2; j++) {
            for (int k=0; k<3; k++) {
                cerr << info[i][j][k] << endl;
                if (info[i][j][k] == INF) info[i][j][k] *= -1;
                else if (info[i][j][k] == NINF) info[i][j][k] *= -1;
            }
        }
    }
*/
    cerr << "________" << endl;

    for (auto m : times) {
        if (m < 0) continue;
        double xmin = min((info[0][0][0]+m), min((info[0][0][1]), (info[0][0][2]-m)));
        double xmax = max(info[0][1][0]+m, max(info[0][1][1], info[0][1][2]-m));
        double ymin = min(info[1][0][0]+m, min(info[1][0][1], info[1][0][2]-m));
        double ymax = max(info[1][1][0]+m, max(info[1][1][1], info[1][1][2]-m));
        double S = (xmax - xmin) * (ymax - ymin);
        cerr << m << ":" << S << endl;
        cerr << xmin << " " << xmax << " " << ymin << " " << ymax << endl;
        if (minS == -1 || minS > S) {minS = S; minT = m;}
    }
    cerr << "##" << minT << endl;
    cout << setprecision(10) << minS << endl;

    return 0;
}



Measured memory_bytes: 1920