#include <iostream>
#include <vector>
#include <algorithm>
#include <tuple>

#define fst(t) std::get<0>(t)
#define snd(t) std::get<1>(t)
#define thd(t) std::get<2>(t)
#define unless(p) if(!(p))
#define until(p) while(!(p))

using ll = std::int64_t;
using P = std::tuple<int,int>;
using T = std::tuple<double,double,double,double>;

constexpr double INF = 1e300;
int N;
double xL1, xL2, xR1, xR2, x1, x2;
double yL1, yL2, yR1, yR2, y1, y2;

std::vector<T> v1, v2, v3, v4;

void f(double xL1, double xL2, double xR1, double xR2, double x1, double x2, std::vector<T> &v1, std::vector<T> &v2){
    if(x1 != INF){
        v1.emplace_back(std::max(x1 - xR1, 0.), xL1 - x1, 0., x1);
    }
    if(xL1 != INF){
        v1.emplace_back(std::max({xL1 - x1, 0.5 * (xL1 - xR1), 0.}), INF, -1., xL1);
    }
    if(xR1 != INF){
        v1.emplace_back(0., std::min(0.5 * (xL1 - xR1), x1 - xR1), 1, xR1);
    }

    if(x2 != -INF){
        v2.emplace_back(std::max(xL2 - x2, 0.), x2 - xR2, 0., x2);
    }
    if(xL2 != -INF){
        v2.emplace_back(0., std::min(xL2 - x2, 0.5 * (xL2 - xR2)), -1, xL2);
    }
    if(xR2 != -INF){
        v2.emplace_back(std::max({0.5 * (xL2 - xR2), x2 - xR2, 0.}), INF, 1, xR2);
    }
}

int main(){
    std::cin.tie(nullptr);
    std::ios::sync_with_stdio(false);

    std::cin >> N;

    xL1 = INF;
    xL2 = -INF;
    xR1 = INF;
    xR2 = -INF;
    x1 = INF;
    x2 = -INF;
    
    yL1 = INF;
    yL2 = -INF;
    yR1 = INF;
    yR2 = -INF;
    y1 = INF;
    y2 = -INF;

    for(int i=0;i<N;++i){
        double x, y;
        char d;
        std::cin >> x >> y >> d;
        
        if(d == 'R'){
            xR1 = std::min(xR1, x);
            xR2 = std::max(xR2, x);
            y1 = std::min(y1, y);
            y2 = std::max(y2, y);
        }else if(d == 'L'){
            xL1 = std::min(xL1, x);
            xL2 = std::max(xL2, x);
            y1 = std::min(y1, y);
            y2 = std::max(y2, y);            
        }else if(d == 'D'){
            yL1 = std::min(yL1, y);
            yL2 = std::max(yL2, y);
            x1 = std::min(x1, x);
            x2 = std::max(x2, x);
        }else{
            yR1 = std::min(yR1, y);
            yR2 = std::max(yR2, y);
            x1 = std::min(x1, x);
            x2 = std::max(x2, x);
        }
    }

    f(xL1, xL2, xR1, xR2, x1, x2, v1, v2);
    f(yL1, yL2, yR1, yR2, y1, y2, v3, v4);

    double res = INF;

    for(auto &t1 : v1){
        double l1, r1, a1, b1;
        std::tie(l1, r1, a1, b1) = t1;

        // std::cout << "1: " << l1 << ", " << r1 << ", " << a1 << ", " << b1<< std::endl;

        if(l1 > r1){
            continue;
        }

        for(auto &t2 : v2){
            double l2, r2, a2, b2;
            std::tie(l2, r2, a2, b2) = t2;

            // std::cout << "2: " << l2 << ", " << r2 << ", " << a2 << ", " << b2<< std::endl;

            if(l2 > r2){
                continue;
            }

            if(r2 < l1 || r1 < l2){
                continue;
            }

            l2 = std::max(l2, l1);
            r2 = std::min(r2, r1);
            a2 -= a1;
            b2 -= b1;

            for(auto &t3 : v3){
                double l3, r3, a3, b3;
                std::tie(l3, r3, a3, b3) = t3;

                // std::cout << "3: " << l3 << ", " << r3 << ", " << a3 << ", " << b3<< std::endl;

                if(l3 > r3){
                    continue;
                }

                for(auto &t4 : v4){
                    double l4, r4, a4, b4;
                    std::tie(l4, r4, a4, b4) = t4;

                    // std::cout << "4: " << l4 << ", " << r4 << ", " << a4 << ", " << b4 << std::endl;

                    if(l4 > r4){
                        continue;
                    }

                    if(r4 < l3 || r3 < l4){
                        continue;
                    }

                    l4 = std::max(l4, l3);
                    r4 = std::min(r4, r3);

                    a4 -= a3;
                    b4 -= b3;

                    if(r4 < l2 || r2 < l4){
                        continue;
                    }

                    l4 = std::max(l4, l2);
                    r4 = std::min(r4, r2);

                    res = std::min({res, (a2 * l4 + b2) * (a4 * l4 + b4), (a2 * r4 + b2) * (a4 * r4 + b4)});

                    if(a2 != 0 && a4 != 0){
                        double x = -0.5 * (a4 * b2 + a2 * b4) / (a2 * a4), y = (a2 * x + b2) * (a4 * x + b4);
                        
                        if(l4 <= x && x <= r4){
                            res = std::min(res, y);
                        }
                    }
                }
            }
        }
    }

    printf("%.10f\n", res);
}


Measured memory_bytes: 256