// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;



using ll = long long;

using ld = long double;



const ll INF = 1e15;



inline ld calc(ll vmax, ll vmin, ll vmax_r, ll vmin_r, ll vmax_l, ll vmin_l, ld t) {

    return max({(ld)vmax, vmax_r + t, vmax_l - t}) - min({(ld)vmin, vmin_r + t, vmin_l - t});

}



int main() {

    cin.tie(0);

    ios::sync_with_stdio(false);

    int n;

    cin >> n;

    vector<ll> x(n), y(n);

    vector<char> d(n);



    ll xmax = -INF, xmin = INF, ymax = -INF, ymin = INF;

    ll ymax_u = -INF, ymin_u = INF, ymax_d = -INF, ymin_d = INF;

    ll xmax_l = -INF, xmin_l = INF, xmax_r = -INF, xmin_r = INF;

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

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

        if (d[i] == 'U') {

            xmax = max(xmax, x[i]);

            xmin = min(xmin, x[i]);

            ymax_u = max(ymax_u, y[i]);

            ymin_u = min(ymin_u, y[i]);

        } else if (d[i] == 'D') {

            xmax = max(xmax, x[i]);

            xmin = min(xmin, x[i]);

            ymax_d = max(ymax_d, y[i]);

            ymin_d = min(ymin_d, y[i]);

        } else if (d[i] == 'L') {

            ymax = max(ymax, y[i]);

            ymin = min(ymin, y[i]);

            xmax_l = max(xmax_l, x[i]);

            xmin_l = min(xmin_l, x[i]);

        } else {

            ymax = max(ymax, y[i]);

            ymin = min(ymin, y[i]);

            xmax_r = max(xmax_r, x[i]);

            xmin_r = min(xmin_r, x[i]);

        }

    }



    ld L = 0, R = 2e8;

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

        ld mid1 = (L * 2 + R) / 3;

        ld x1 = calc(xmax, xmin, xmax_r, xmin_r, xmax_l, xmin_l, mid1);

        ld y1 = calc(ymax, ymin, ymax_u, ymin_u, ymax_d, ymin_d, mid1);

        ld val1 = x1 * y1;



        ld mid2 = (L + R * 2) / 3;

        ld x2 = calc(xmax, xmin, xmax_r, xmin_r, xmax_l, xmin_l, mid2);

        ld y2 = calc(ymax, ymin, ymax_u, ymin_u, ymax_d, ymin_d, mid2);

        ld val2 = x2 * y2;



        if (val1 < val2) R = mid2;

        else L = mid1;    

    }



    ld x1 = calc(xmax, xmin, xmax_r, xmin_r, xmax_l, xmin_l, L);

    ld y1 = calc(ymax, ymin, ymax_u, ymin_u, ymax_d, ymin_d, L);

    ld val1 = x1 * y1;



    ld x2 = calc(xmax, xmin, xmax_r, xmin_r, xmax_l, xmin_l, R);

    ld y2 = calc(ymax, ymin, ymax_u, ymin_u, ymax_d, ymin_d, R);

    ld val2 = x2 * y2;    

    cout << fixed << setprecision(15) << min(val1, val2) << "\n";

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.457218967649641x):
#include <bits/stdc++.h>



using namespace std;



using ll = long long;

using ld = long double;



const ll INF = 1e15;



inline ld calc(ll vmax, ll vmin, ll vmax_r, ll vmin_r, ll vmax_l, ll vmin_l, ld t) {

    return max({(ld)vmax, vmax_r + t, vmax_l - t}) - min({(ld)vmin, vmin_r + t, vmin_l - t});

}



int main() {

    cin.tie(0);

    ios::sync_with_stdio(false);

    int n;

    cin >> n;

    vector<ll> x(n), y(n);

    vector<char> d(n);



    ll xmax = -INF, xmin = INF, ymax = -INF, ymin = INF;

    ll ymax_u = -INF, ymin_u = INF, ymax_d = -INF, ymin_d = INF;

    ll xmax_l = -INF, xmin_l = INF, xmax_r = -INF, xmin_r = INF;

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

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

        if (d[i] == 'U') {

            xmax = max(xmax, x[i]);

            xmin = min(xmin, x[i]);

            ymax_u = max(ymax_u, y[i]);

            ymin_u = min(ymin_u, y[i]);

        } else if (d[i] == 'D') {

            xmax = max(xmax, x[i]);

            xmin = min(xmin, x[i]);

            ymax_d = max(ymax_d, y[i]);

            ymin_d = min(ymin_d, y[i]);

        } else if (d[i] == 'L') {

            ymax = max(ymax, y[i]);

            ymin = min(ymin, y[i]);

            xmax_l = max(xmax_l, x[i]);

            xmin_l = min(xmin_l, x[i]);

        } else {

            ymax = max(ymax, y[i]);

            ymin = min(ymin, y[i]);

            xmax_r = max(xmax_r, x[i]);

            xmin_r = min(xmin_r, x[i]);

        }

    }



    ld L = 0, R = 1e8;

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

        ld mid1 = (L * 2 + R) / 3;

        ld x1 = calc(xmax, xmin, xmax_r, xmin_r, xmax_l, xmin_l, mid1);

        ld y1 = calc(ymax, ymin, ymax_u, ymin_u, ymax_d, ymin_d, mid1);

        ld val1 = x1 * y1;



        ld mid2 = (L + R * 2) / 3;

        ld x2 = calc(xmax, xmin, xmax_r, xmin_r, xmax_l, xmin_l, mid2);

        ld y2 = calc(ymax, ymin, ymax_u, ymin_u, ymax_d, ymin_d, mid2);

        ld val2 = x2 * y2;



        if (val1 < val2) R = mid2;

        else L = mid1;    

    }



    ld x1 = calc(xmax, xmin, xmax_r, xmin_r, xmax_l, xmin_l, L);

    ld y1 = calc(ymax, ymin, ymax_u, ymin_u, ymax_d, ymin_d, L);

    ld val1 = x1 * y1;



    ld x2 = calc(xmax, xmin, xmax_r, xmin_r, xmax_l, xmin_l, R);

    ld y2 = calc(ymax, ymin, ymax_u, ymin_u, ymax_d, ymin_d, R);

    ld val2 = x2 * y2;    

    cout << fixed << setprecision(15) << min(val1, val2) << "\n";

    return 0;

}