#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>

#define F first
#define S second
#define int long long
#define ll long long
//#define int  unsigned long long
#define pb push_back
#define double long double

using namespace std;
using namespace __gnu_pbds;
typedef  tree< int , null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
const int N = 900000;
const int K = 60;
const int mod = 1e9 + 7;
int a[N], used[N], cnt[N], s[N], n, m, b[N], ip = 1, qq[N], ans[N];
int x[N], y[N], l[N], r[N], d[N], u[N];
char c[N];
vector < int > q[N];
set < int > p;
int calc(int t){
    int res = 1e18;
  //  cout << t << endl;
    for (int j = -2000; j <= 2000; j++){
        int l, r, d, u;
        l = d = 1e9;
        r = u = -1e9;
        int tc = t + j;
        if (tc < 0) continue;
        for (auto i: p){
            int xc = x[i];
            int yc = y[i];
            if (c[i] == 'L') xc -= tc;
            if (c[i] == 'R') xc += tc;
            if (c[i] == 'U') yc += tc;
            if (c[i] == 'D') yc -= tc;
            r = max(r, xc);
            l = min(l, xc);
            u = max(u, yc);
            d = min(d, yc);
        }
        res = min(res,  (r - l) * (u - d));
    }
    return res;
}
main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
   // freopen("input.txt", "r", stdin);
    for (int i = 0; i < 4; i++){
        l[i] = d[i] = 1e9;
        r[i] = u[i] = -1e9;
    }
    cin >> n;
    for (int i = 1; i <= n; i++){
        cin >> x[i] >> y[i];
        cin >> c[i];
        x[i] *= 2;
        y[i] *= 2;
        if (c[i] == 'L'){
            l[0] = min(l[0], x[i]);
            r[0] = max(r[0], x[i]);
            d[0] = min(d[0], y[i]);
            u[0] = max(u[0], y[i]);
        }
        if (c[i] == 'R'){
            l[1] = min(l[1], x[i]);
            r[1] = max(r[1], x[i]);
            d[1] = min(d[1], y[i]);
            u[1] = max(u[1], y[i]);
        }
        if (c[i] == 'U'){
            l[2] = min(l[2], x[i]);
            r[2] = max(r[2], x[i]);
            d[2] = min(d[2], y[i]);
            u[2] = max(u[2], y[i]);
        }
        if (c[i] == 'D'){
            l[3] = min(l[3], x[i]);
            r[3] = max(r[3], x[i]);
            d[3] = min(d[3], y[i]);
            u[3] = max(u[3], y[i]);
        }
    }
    for (int i = 1; i <= n; i++){
        if (c[i] == 'L'){
            if (x[i] == l[0]){
                l[0] = 1e9;
                p.insert(i);
            }
            if (x[i] == r[0]){
                r[0] = -1e9;
                p.insert(i);
            }
            if (y[i] == d[0]){
                d[0] = 1e9;
                p.insert(i);
            }
            if (y[i] == u[0]){
                u[0] = -1e9;
                p.insert(i);
            }
        }
        if (c[i] == 'R'){
            if (x[i] == l[1]){
                l[1] = 1e9;
                p.insert(i);
            }
            if (x[i] == r[1]){
                r[1] = -1e9;
                p.insert(i);
            }
            if (y[i] == d[1]){
                d[1] = 1e9;
                p.insert(i);
            }
            if (y[i] == u[1]){
                u[1] = -1e9;
                p.insert(i);
            }
        }
        if (c[i] == 'U'){
            if (x[i] == l[2]){
                l[2] = 1e9;
                p.insert(i);
            }
            if (x[i] == r[2]){
                r[2] = -1e9;
                p.insert(i);
            }
            if (y[i] == d[2]){
                d[2] = 1e9;
                p.insert(i);
            }
            if (y[i] == u[2]){
                u[2] = -1e9;
                p.insert(i);
            }
        }
        if (c[i] == 'D'){
            if (x[i] == l[3]){
                l[3] = 1e9;
                p.insert(i);
            }
            if (x[i] == r[3]){
                r[3] = -1e9;
                p.insert(i);
            }
            if (y[i] == d[3]){
                d[3] = 1e9;
                p.insert(i);
            }
            if (y[i] == u[3]){
                u[3] = -1e9;
                p.insert(i);
            }
        }
    }
    int ans = calc(0);
    for (auto i: p){
        for (auto j: p){
            if (x[i] < x[j] && c[i] == 'R' && c[j] != 'R') ans = min(ans, calc((x[j] - x[i]) / (1 + (c[j] == 'L'))));
            if (y[i] > y[j] && c[i] == 'D' && c[j] != 'D') ans = min(ans, calc((y[i] - y[j]) / (1 + (c[j] == 'U'))));
            if (x[i] > x[j] && c[i] == 'L' && c[j] != 'L') ans = min(ans, calc((x[i] - x[j]) / (1 + (c[j] == 'R'))));
            if (y[i] < y[j] && c[i] == 'U' && c[j] != 'U') ans = min(ans, calc((y[j] - y[i]) / (1 + (c[j] == 'D'))));
        }
    }
  //  cout << p.size() << endl;
    double res = ans;
    cout << fixed << setprecision(20) << res / 4;
}


Measured memory_bytes: 37120