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

#define err(args...) {}

#ifdef DEBUG

#include "_debug.cpp"

#endif

using namespace std;

using ll = long long;

using ld = long double;

template <typename T> using lim = numeric_limits<T>;

template <typename T> istream& operator>>(istream& is, vector<T>& a) { for(T& x : a) { is >> x; } return is; }

const int N = 100'000;

double x[N], y[N], dx[N], dy[N], nx[N], ny[N];

template <typename signature> using f = const function<signature>&;

template <typename TIn, typename TOut> TIn tsearch(TIn L, TIn R, f<TOut(TIn)> obj, f<bool(TOut, TOut)> cmp = less<TOut>()) {

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

        TIn M1 = (2 * L + R) / 3;

        TIn M2 = (L + 2 * R) / 3;

        cmp(obj(M1), obj(M2)) ? R = M2 : L = M1;

    }

    return cmp(obj(L), obj(R)) ? L : R;

}

int main() {

    ios_base::sync_with_stdio(false);

    cin.tie(0);

    int n;

    cin >> n;

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

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

        char dir;

        cin >> dir;

        dx[i] += (dir == 'R') - (dir == 'L');

        dy[i] += (dir == 'U') - (dir == 'D');

    }

    auto diffx = [&](double t) {

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

            nx[i] = x[i] + dx[i] * t;

        }

        return *max_element(nx, nx + n) - *min_element(nx, nx + n);

    };

    auto diffy = [&](double t) {

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

            ny[i] = y[i] + dy[i] * t;

        }

        return *max_element(ny, ny + n) - *min_element(ny, ny + n);

    };

    auto diff = [&](double t) {

        return diffx(t) * diffy(t);

    };

    double tminx = tsearch<double, double>(0, 2e8, diffx);

    double tminy = tsearch<double, double>(0, 2e8, diffy);

    double tmin = tsearch<double, double>(0, 2e8, diff);

    cout << fixed << setprecision(9) << min({diffx(tminx) * diffy(tminx), diffx(tminy) * diffy(tminy), diff(tmin)}) << endl;

    return 0;

}


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

#define err(args...) {}

#ifdef DEBUG

#include "_debug.cpp"

#endif

using namespace std;

using ll = long long;

using ld = long double;

template <typename T> using lim = numeric_limits<T>;

template <typename T> istream& operator>>(istream& is, vector<T>& a) { for(T& x : a) { is >> x; } return is; }

const int N = 100'000;

double x[N], y[N], dx[N], dy[N], nx[N], ny[N];

template <typename signature> using f = const function<signature>&;

template <typename TIn, typename TOut> TIn tsearch(TIn L, TIn R, f<TOut(TIn)> obj, f<bool(TOut, TOut)> cmp = less<TOut>()) {

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

        TIn M1 = (2 * L + R) / 3;

        TIn M2 = (L + 2 * R) / 3;

        cmp(obj(M1), obj(M2)) ? R = M2 : L = M1;

    }

    return cmp(obj(L), obj(R)) ? L : R;

}

int main() {

    ios_base::sync_with_stdio(false);

    cin.tie(0);

    int n;

    cin >> n;

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

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

        char dir;

        cin >> dir;

        dx[i] += (dir == 'R') - (dir == 'L');

        dy[i] += (dir == 'U') - (dir == 'D');

    }

    auto diffi = [&](double t, auto& updated, auto& original, auto& d) {

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

            updated[i] = original[i] + d[i] * t;

        }

        return *max_element(updated, updated + n) - *min_element(updated, updated + n);

    };

    auto diff = [&](double t) {

        return diffi(t, nx, x, dx) * diffi(t, ny, y, dy);

    };

    cout << fixed << setprecision(9) << diff(tsearch<double, double>(0, 2e8, diff)) << endl;

    return 0;

}