#include <bits/stdc++.h>
using namespace std;
const double INF = 1e18;

int main(){
    int n;
    cin >> n;

    vector<vector<int>> fix(2);// x, y
    vector<vector<int>> move(4);// R, L, U, D
    for(int i=0; i<n; i++){
        int x, y; char d;
        cin >> x >> y >> d;

        if(d == 'R'){ move[0].push_back(x); fix[1].push_back(y); }
        if(d == 'L'){ move[1].push_back(x); fix[1].push_back(y); }
        if(d == 'U'){ move[2].push_back(y); fix[0].push_back(x); }
        if(d == 'D'){ move[3].push_back(y); fix[0].push_back(x); }
    }
    for(int j=0; j<2; j++) sort(fix[j].begin(), fix[j].end());
    for(int j=0; j<4; j++) sort(move[j].begin(), move[j].end());

    set<double> time = {0};
    // leftmost
    if(fix[0].empty() == false  && move[0].empty() == false) time.insert((double)max(0, fix[0][0] - move[0][0]));// / 1.0
    if(fix[0].empty() == false  && move[1].empty() == false) time.insert((double)max(0, move[1][0] - fix[0][0]));// / 1.0
    if(move[0].empty() == false && move[1].empty() == false) time.insert(max(0., (move[1][0] - move[0][0]) / 2.0));
    // rightmost
    if(fix[0].empty() == false  && move[0].empty() == false) time.insert((double)max(0, fix[0].back() - move[0].back()));// / 1.0
    if(fix[0].empty() == false  && move[1].empty() == false) time.insert((double)max(0, move[1].back() - fix[0].back()));// / 1.0
    if(move[0].empty() == false && move[1].empty() == false) time.insert(max(0., (move[1].back() - move[0].back()) / 2.0));
    // downmost
    if(fix[1].empty() == false  && move[2].empty() == false) time.insert((double)max(0, fix[1][0] - move[2][0]));// / 1.0
    if(fix[1].empty() == false  && move[3].empty() == false) time.insert((double)max(0, move[3][0] - fix[1][0]));// / 1.0
    if(move[2].empty() == false && move[3].empty() == false) time.insert(max(0., (move[3][0] - move[2][0]) / 2.0));
    // upmost
    if(fix[1].empty() == false  && move[2].empty() == false) time.insert((double)max(0, fix[1].back() - move[2].back()));// / 1.0
    if(fix[1].empty() == false  && move[3].empty() == false) time.insert((double)max(0, move[3].back() - fix[1].back()));// / 1.0
    if(move[2].empty() == false && move[3].empty() == false) time.insert(max(0., (move[3].back() - move[2].back()) / 2.0));

    double ans = INF;
    for(double t : time){
        double left = INF;
        if(fix[0].empty() == false)  left = min(left, (double)fix[0][0]);
        if(move[0].empty() == false) left = min(left, move[0][0] + t);
        if(move[1].empty() == false) left = min(left, move[1][0] - t);

        double right = -INF;
        if(fix[0].empty() == false)  right = max(right, (double)fix[0].back());
        if(move[0].empty() == false) right = max(right, move[0].back() + t);
        if(move[1].empty() == false) right = max(right, move[1].back() - t);

        double down = INF;
        if(fix[1].empty() == false)  down = min(down, (double)fix[1][0]);
        if(move[2].empty() == false) down = min(down, move[2][0] + t);
        if(move[3].empty() == false) down = min(down, move[3][0] - t);

        double up = -INF;
        if(fix[1].empty() == false)  up = max(up, (double)fix[1].back());
        if(move[2].empty() == false) up = max(up, move[2].back() + t);
        if(move[3].empty() == false) up = max(up, move[3].back() - t);


        double area = (right - left) * (up - down);
        //cout << t << " " << fixed << setprecision(5) << area << endl;
        ans = min(ans, area);
    }
    cout << fixed << setprecision(10) << ans << endl;
    return 0;
}

Measured memory_bytes: 4576