#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <fstream>
#include <iostream>
#include <algorithm>
#include <bitset>
#include <array>
#include <vector>
#include <queue>
#include <set>
#include <cmath> // 変数名にy1が使えなくなるかも…。
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <string>

typedef __int128_t int128_t;
std::istream &operator>>(std::istream& input, int128_t& value) { // int128_tの入力。入力が64bitに収まる前提。
    long long tmp; input >> tmp; value = tmp;
    return input;
}
std::ostream &operator<<(std::ostream& output, const int128_t value) { // int128_tの出力。出力が64bitに収まる前提。
    output << (long long)value;
    return output;
}

const int MAX_N = 100050;
int N;
int128_t x[MAX_N], y[MAX_N];
char d[MAX_N];

std::vector<double> t_vec;

std::pair<double, double> calc_bound(double t, std::vector<double>& vd, std::vector<double>& vc, std::vector<double>& vi) {
    //double max = std::numeric_limits<double>::min();
    double min = std::numeric_limits<double>::max();
    double max = -min;

    for (auto v : vd) {
        min = std::min(min, v - t);
        max = std::max(max, v - t);
    }
    for (auto v : vc) {
        min = std::min(min, v);
        max = std::max(max, v);
    }
    for (auto v : vi) {
        min = std::min(min, v + t);
        max = std::max(max, v + t);
    }
    return std::pair<double, double>({min, max});
}

void set_time(std::vector<double>& vd, std::vector<double>& vc, std::vector<double>& vi) {
    t_vec.push_back(0);
    if (0 < vd.size() && 0 < vi.size()) {
        if (vi[0] < vd[0]) {
            double tmp = vd[0] - vi[0];
            t_vec.push_back(tmp / 2);
        }
        if (vi.back() < vd.back()) {
            double tmp = vd.back() - vi.back();
            t_vec.push_back(tmp / 2);
        }
    }
    if (0 < vd.size() && 0 < vc.size()) {
        if (vc[0] < vd[0]) {
            t_vec.push_back(vd[0] - vc[0]);
        }
        if (vc.back() < vd.back()) {
            t_vec.push_back(vd.back() - vc.back());
        }
    }
    if (0 < vi.size() && 0 < vc.size()) {
        if (vi[0] < vc[0]) {
            t_vec.push_back(vc[0] - vi[0]);
        }
        if (vi.back() < vc.back()) {
            t_vec.push_back(vc.back() - vi.back());
        }
    }
}

int main(int argc, char **argv) {
    std::cin >> N;
    for (int i = 1; i <= N; i++) {
        std::cin >> x[i] >> y[i] >> d[i];
    }

    std::vector<double> x_d, x_c, x_i;
    std::vector<double> y_d, y_c, y_i;
    
    //t_vec.push_back(0);
    
    for (int i = 1; i <= N; i++) {
        if (d[i] == 'L') {
            x_d.push_back(x[i]);
            y_c.push_back(y[i]);
        } else if (d[i] == 'R') {
            x_i.push_back(x[i]);
            y_c.push_back(y[i]);
        } else if (d[i] == 'U') {
            x_c.push_back(x[i]);
            y_i.push_back(y[i]);
        } else {
            x_c.push_back(x[i]);
            y_d.push_back(y[i]);
        }
    }

    std::sort(x_d.begin(), x_d.end());
    std::sort(x_i.begin(), x_i.end());
    std::sort(x_c.begin(), x_c.end());

    std::sort(y_d.begin(), y_d.end());
    std::sort(y_i.begin(), y_i.end());
    std::sort(y_c.begin(), y_c.end());

    set_time(x_d, x_c, x_i);
    set_time(y_d, y_c, y_i);

    //std::sort(t_vec.begin(), t_vec.end());
    //t_vec.erase(std::unique(t_vec.begin(), t_vec.end()), t_vec.end());

    double ret = std::numeric_limits<double>::max();

    for (double t : t_vec) {
        auto bx = calc_bound(t, x_d, x_c, x_i);
        auto by = calc_bound(t, y_d, y_c, y_i);
        ret = std::min(ret, (bx.second - bx.first) * (by.second - by.first));
    }

    printf("%.10f\n", ret);
    //std::cout << ans << std::endl;


    return 0;
}

Measured memory_bytes: 5488