//
//  main.cpp
//
// https://atcoder.jp/contests/abc130/tasks/abc130_e

#include <algorithm>
#include <array>
#include <assert.h>
#include <functional>
#include <iostream>
#include <limits>
#include <math.h>
#include <memory>
#include <queue>
#include <random>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <vector>

using namespace std;

using ll = long long;
using ull = unsigned long long;

int main(int argc, char* argv[]) {
    struct Point {
        int start = 0;
        int vec = 0;
        Point(int start, int vec)
        : start(start), vec(vec) {};
        double eval(double t) {
            return (double)start + (double)vec * t;
        }
    };
    vector<int> points_x_inc;
    vector<int> points_x_dec;
    vector<int> points_x_stop;
    vector<int> points_y_inc;
    vector<int> points_y_dec;
    vector<int> points_y_stop;
    int N;
    cin >> N;
    for (int i = 0; i < N; i++) {
        int xi, yi;
        char d;
        cin >> xi >> yi >> d;
        if (d == 'R') {
            points_x_inc.push_back(xi);
            points_y_stop.push_back(yi);
        } else if (d == 'L') {
            points_x_dec.push_back(xi);
            points_y_stop.push_back(yi);
        } else if (d == 'U') {
            points_x_stop.push_back(xi);
            points_y_inc.push_back(yi);
        } else {
            assert(d == 'D');
            points_x_stop.push_back(xi);
            points_y_dec.push_back(yi);
        }
    }
    for (vector<int>* pts : {&points_x_inc, &points_x_dec, &points_x_stop, &points_y_inc, &points_y_dec, &points_y_stop}) {
        sort(pts->begin(), pts->end());
        if (pts->size() > 2) {
            *pts = {pts->front(), pts->back()};
        }
    }
    vector<Point> points_x;
    vector<Point> points_y;
    for (int axis = 0; axis < 2; axis++) {
        vector<Point>* dst = (axis == 0) ? &points_x : &points_y;
        vector<int>* stop = (axis == 0) ? &points_x_stop : &points_y_stop;
        vector<int>* inc = (axis == 0) ? &points_x_inc : &points_y_inc;
        vector<int>* dec = (axis == 0) ? &points_x_dec : &points_y_dec;
        for (int start : *stop) {
            dst->push_back(Point(start, 0));
        }
        for (int start : *inc) {
            dst->push_back(Point(start, 1));
        }
        for (int start : *dec) {
            dst->push_back(Point(start, -1));
        }
    }
    auto calc_len = [&points_x, &points_y](int axis, double t) {
        double pt_min = numeric_limits<double>::max();
        double pt_max = numeric_limits<double>::lowest();
        vector<Point> points = (axis == 0) ? points_x : points_y;
        for (Point& pt : points) {
            pt_min = min(pt_min, pt.eval(t));
            pt_max = max(pt_max, pt.eval(t));
        }
        return pt_max - pt_min;
    };
    vector<double> event_times;
    event_times.push_back(0.0);
    for (int axis = 0; axis < 2; axis++) {
        vector<Point>& points = (axis == 0) ? points_x : points_y;
        for (int i = 0; i < points.size(); i++) {
            for (int j = 0; j < i; j++) {
                if (points[i].vec == points[j].vec) {
                    continue;
                }
                double time = ((double)points[i].start - (double)points[j].start) / ((double)points[j].vec - (double)points[i].vec);
                time = round(time * 2.0) / 2.0;
                if (time <= 0.0) {
                    continue;
                }
                event_times.push_back(time);
            }
        }
    }
    sort(event_times.begin(), event_times.end());
    double min_area = numeric_limits<double>::max();
    for (double time : event_times) {
        double area = calc_len(0, time) * calc_len(1, time);
        min_area = min(min_area, area);
    }
    printf("%.4lf\n", min_area);
}



Measured memory_bytes: 1272