#include <iostream>
#include <chrono>
#include <iomanip>
#include <fstream>
#include <string>
#include <array>
#include <vector>
#include <deque>
#include <list>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <stack>
#include <queue>
#include <bitset>
#include <tuple>
#include <cmath>
#include <complex>
#include <algorithm>
#include <utility>
#include <regex>
#include <cstdint>
#include <numeric>
#include <functional>
#include <cassert>

using namespace std;
using ll = long long;
using ull = unsigned long long;

constexpr ll INF = 1'000'000'000'000'000'000;
namespace utils{
#define ALL(x) begin(x), end(x)
#define rALL(x) rbegin(x), rend(x)
    template<class T, class Compare> using p_queue = priority_queue<T, vector<T>, Compare>;
    template<class T> using min_queue = p_queue<T, greater<T>>;
    template<class T> using max_queue = p_queue<T, less<T>>;

    template<class T> bool min_update(T& X, const T& A){ if(X > A) {X = A; return true;} return false; }
    template<class T> bool max_update(T& X, const T& A){ if(X < A) {X = A; return true;} return false; }
    using V_Set = unordered_set<int>;
    using E_Set = unordered_map<int, V_Set>;

    ll operator"" _64(unsigned long long x){ return ll(x); }
    ull operator"" _64u(unsigned long long x){ return ull(x); }

    template<typename T> vector<T> make_vector(size_t sz, T t){
        return vector<T>(sz, t);
    }

    template<typename T,typename... Ts>
    auto make_vector(size_t sz, Ts... ts){
        return vector<decltype(make_vector<T>(ts...))>(sz, make_vector<T>(ts...));
    }

    template<class T>
    ostream& operator<<(ostream& os, const vector<T>& v){
        for (auto &&x : v) { os << x << ' '; } return os ;
    }
}
using namespace utils;

class solver{

    vector<ll> x, y;
    vector<char> d;
public:

    double calc(double t){
        double minx, maxx, miny, maxy;
        minx = miny = INF;
        maxx = maxy = -INF;
        for (int i = 0; i < x.size(); ++i) {
            double nx, ny;
            nx = x[i]; ny = y[i];
            if(d[i] == 'R'){ nx += t; }
            else if(d[i] == 'L') nx -= t;
            else if(d[i] == 'U') ny += t;
            else ny -= t;
            minx = min(minx, nx); max_update(maxx, nx);
            min_update(miny, ny); max_update(maxy, ny);
        } // end i
        return (maxx - minx) * (maxy - miny);
    }


    bool canzero(){
        return
                [&]() {

                    ll lx, rx;
                    lx = rx = INF;
                    for (int i = 0; i < x.size(); ++i) {
                        if (d[i] == 'L') {
                            if (lx == INF) lx = x[i];
                            else {
                                if (lx != x[i]) return false;
                            }
                        }
                        else if(d[i] == 'R'){
                            if(rx == INF) rx = x[i];
                            else{
                                if(rx != x[i]) return false;
                            }
                        }
                    } // end i
                    for (int i = 0; i < x.size(); ++i) {
                        if(d[i] == 'U' or d[i] == 'D'){
                            if(x[i] != lx and x[i] != rx) return false;
                        }
                    } // end i
                    return true;


                }() or [&](){
                    ll lx, rx;
                    lx = rx = INF;
                    for (int i = 0; i < x.size(); ++i) {
                        if (d[i] == 'U') {
                            if (lx == INF) lx = y[i];
                            else {
                                if (lx != y[i]) return false;
                            }
                        }
                        else if(d[i] == 'D'){
                            if(rx == INF) rx = y[i];
                            else{
                                if(rx != y[i]) return false;
                            }
                        }
                    } // end i
                    for (int i = 0; i < x.size(); ++i) {
                        if(d[i] == 'L' or d[i] == 'R'){
                            if(y[i] != lx and y[i] != rx) return false;
                        }
                    } // end i
                    return true;

        }();

    }

    void run(istream &is, ostream& os){
        ll N; is >> N;
        if(!is) return;
        x.resize(N); y.resize(N); d.resize(N);
        for (int i = 0; i < N; ++i) {
            is >> x[i] >> y[i] >> d[i];
        } // end i
        if(canzero()){
            cout << 0 << endl;
            return ;
        }

        double l = 0, r = 4*1e+8;
        double m = (l + r) / 2;
        double fm = calc(m);
        double eps = 1e-14;
        while(r - l > eps and (r / l - 1.) > eps){
            if(r - m > m - l){
                double m2 = r/2. + m/2.;
                double fm2 = calc(m2);
                if(fm2 > fm){ r = m2; }
                else {
                    l = m;
                    m = m2;
                    fm = fm2;
                }
            }
            else{
                double m2 = l/2. + m/2.;
                double fm2 = calc(m2);
                if(fm2 > fm){ l = m2; }
                else {
                    r = m;
                    m = m2;
                    fm = fm2;
                }
            }

        }
        cout << fm << endl;


    }
};

int main(int argc, char *argv[]) {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << setprecision(16) << scientific;
#ifdef DEBUG
    string test_cases = "test_F.txt";
    cerr << "DEBUG MODE" <<  endl;
    cerr << test_cases << " -->" << endl;
    auto fs = fstream(test_cases, fstream::in);
    int lp = 0;
    while(fs) {
        auto start = chrono::system_clock::now();
        lp++;
        cout << lp <<  "#------\n";
        solver().run(fs, cout);
        auto end = chrono::system_clock::now();
        cout << "time :: "
        << chrono::duration_cast<chrono::milliseconds>(end - start).count()
        << "ms\n";
    }
    cout << "------#" << endl;
    if(lp <= 1) {
        while(cin) solver().run(cin, cout);
    }
#else
    solver().run(cin, cout);
#endif
    return 0;
}


Measured memory_bytes: 1920