// Slower C++ solution:
//#pragma GCC optimize("Ofast")

//#pragma GCC optimize("unroll-loops")

//#pragma GCC target("fma,avx,avx2")



#include <bits/stdc++.h>



using namespace std;



#define int long long

#define ld long double

#define sz(a) (int) (a).size()

#define all(a) (a).begin(), (a).end()

#define x first

#define y second



mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());



const ld inf = 6e8;

const ld eps = 1e-10;



int n;

vector<ld> x, y;

vector<char> d;



ld get_x(int i, ld t) {

    if (d[i] == 'L') return x[i] - t;

    if (d[i] == 'R') return x[i] + t;

    return x[i];

}



ld get_y(int i, ld t) {

    if (d[i] == 'D') return y[i] - t;

    if (d[i] == 'U') return y[i] + t;

    return y[i];

}



ld solve(ld t) {

    ld mx_x = -inf * inf, mn_x = inf * inf;

    ld mx_y = -inf * inf, mn_y = inf * inf;

    for (int i = 0; i < n; i++) {

        ld xx = get_x(i, t);

        ld yy = get_y(i, t);

        mx_x = max(mx_x, xx);

        mn_x = min(mn_x, xx);

        mx_y = max(mx_y, yy);

        mn_y = min(mn_y, yy);

    }

    return (mx_x - mn_x) * (mx_y - mn_y);

}



signed main() {

    ios::sync_with_stdio(false);

    cin.tie(0), cout.tie(0);



    cin >> n;

    x.resize(n);

    y.resize(n);

    d.resize(n);

    for (int i = 0; i < n; i++) {

        cin >> x[i] >> y[i] >> d[i];

    }

    ld l = 0.0, r = inf, m2, m1;

    ld three = 3.0;

    for (int i = 0; i < 600; i++) {

        m1 = l + (r - l) / three;

        m2 = r - (r - l) / three;

        if (solve(m1) + eps > solve(m2)) {

            l = m1;

        } else {

            r = m2;

        }

    }

    cout << fixed << setprecision(12) << solve(l) << "\n";

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.3429948556313185x):
//#pragma GCC optimize("Ofast")

//#pragma GCC optimize("unroll-loops")

//#pragma GCC target("fma,avx,avx2")



#include <bits/stdc++.h>



using namespace std;



#define int long long

#define ld long double

#define sz(a) (int) (a).size()

#define all(a) (a).begin(), (a).end()

#define x first

#define y second



mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());



const ld inf = 6e8;

const ld eps = 1e-10;



int n;

vector<ld> x, y;

vector<char> d;



ld get_x(int i, ld t) {

    if (d[i] == 'L') return x[i] - t;

    if (d[i] == 'R') return x[i] + t;

    return x[i];

}



ld get_y(int i, ld t) {

    if (d[i] == 'D') return y[i] - t;

    if (d[i] == 'U') return y[i] + t;

    return y[i];

}



ld solve(ld t) {

    ld mx_x = -inf * inf, mn_x = inf * inf;

    ld mx_y = -inf * inf, mn_y = inf * inf;

    for (int i = 0; i < n; i++) {

        ld xx = get_x(i, t);

        ld yy = get_y(i, t);

        mx_x = max(mx_x, xx);

        mn_x = min(mn_x, xx);

        mx_y = max(mx_y, yy);

        mn_y = min(mn_y, yy);

    }

    return (mx_x - mn_x) * (mx_y - mn_y);

}



signed main() {

    ios::sync_with_stdio(false);

    cin.tie(0), cout.tie(0);



    cin >> n;

    x.resize(n);

    y.resize(n);

    d.resize(n);

    for (int i = 0; i < n; i++) {

        cin >> x[i] >> y[i] >> d[i];

    }

    ld l = 0.0, r = inf, m2, m1;

    for (int i = 0; i < 200; i++) {

        m1 = l + (r - l) / 3;

        m2 = r - (r - l) / 3;

        if (solve(m1) + eps > solve(m2)) {

            l = m1;

        } else {

            r = m2;

        }

    }

    cout << fixed << setprecision(12) << solve(l) << "\n";

    return 0;

}