#include <bits/stdc++.h>

using namespace std;

const long long max_n = -1, inf = 1000111222;

struct line {
    long long k, b;

    line() {
    }

    line(long long k, long long b): k(k), b(b) {
    }

    line(long long x, long long y1, long long y2) {
        k = y2 - y1;
        b = y1 - k * x;
    }

    long long get(long long x) const {
        return k * x + b;
    }
};

struct state {
    long long l, r;
    line ln;

    state(long long l, long long r, const line &ln): l(l), r(r), ln(ln) {
    }
};

//typedef long long very_long;
typedef __int128 very_long;

long long n;
very_long ans;
vector<line> vx, vy;

long long get(const vector<line> &v, long long t) {
    long long mx = -1e18, mn = 1e18;
    for (const line &l : v) {
        mx = max(mx, l.get(t));
        mn = min(mn, l.get(t));
    }
    return mx - mn;
}

vector<state> getv(const vector<line> &v) {
    vector<state> res;
    long long cur = 0;
    while (cur != inf) {
        long long l = cur, r = inf + 1;
        line ln(cur, get(v, cur), get(v, cur + 1));
        while (r - l > 1) {
            long long mid = (l + r) / 2;
            if (ln.get(mid) == get(v, mid)) {
                l = mid;
            } else {
                r = mid;
            }
        }
        res.push_back({cur, l, ln});
        cur = l;
    }
    return res;
}

void upd(very_long x) {
    if (ans > x) {
        ans = x;
    }
}

int main() {
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    ans = 1LL * inf * inf;
    ans *= ans;
    scanf("%lld", &n);
    for (long long i = 0; i < n; ++i) {
        long long x, y;
        char dir;
        scanf("%lld%lld %c", &x, &y, &dir);
        x *= 2;
        y *= 2;
        if (dir == 'L') {
            vx.push_back({-1, x});
        } else if (dir == 'R') {
            vx.push_back({1, x});
        } else {
            vx.push_back({0, x});
        }

        if (dir == 'U') {
            vy.push_back({1, y});
        } else if (dir == 'D') {
            vy.push_back({-1, y});
        } else {
            vy.push_back({0, y});
        }
    }
    vector<state> v1 = getv(vx);
    vector<state> v2 = getv(vy);
    //cout << v1.size() << endl;
    //cout << v2.size() << endl;
    vector<long long> all;
    for (const state &s : v1) {
        //cout << "!" << s.l << " " << s.r << ": " << s.ln.k << " " << s.ln.b << endl;
        all.push_back(s.l);
        all.push_back(s.r);
    }
    for (const state &s : v2) {
        all.push_back(s.l);
        all.push_back(s.r);
    }
    sort(all.begin(), all.end());
    all.erase(unique(all.begin(), all.end()), all.end());
    for (long long i = 0; i + 1 < all.size(); ++i) {
        const long long l = all[i], r = all[i + 1];
        line l1, l2;
        for (const state &s : v1) {
            if (s.l <= l && r <= s.r) {
                l1 = s.ln;
                break;
            }
        }
        for (const state &s : v2) {
            if (s.l <= l && r <= s.r) {
                l2 = s.ln;
                break;
            }
        }
        very_long u = 64;
        u *= l1.get(l);
        u *= l2.get(l);
        upd(u);
        u = 64;
        u *= l1.get(r);
        u *= l2.get(r);
        upd(u);
        continue;
        if (l1.k == 0 || l2.k == 0) {
        } else {
            very_long C = 1LL * l1.k * l2.b + 1LL * l2.k * l1.b;
            very_long A = 1LL * l1.k * l2.k;
            C *= 4;
            very_long X = -C / A; // 8X
            if (8LL * l <= X && X <= 8LL * r) {
                upd((l1.k * X + 8LL * l1.b) * (l2.k * X + 8LL * l2.b));
            }
        }
    }
    string s;
    long long o = (ans % 256) * 390625;
    ans /= 256;
    if (ans == 0) {
        s = "0";
    }
    while (ans) {
        s += ans % 10 + '0';
        ans /= 10;
    }
    reverse(s.begin(), s.end());
    printf("%s.%08d", s.c_str(), o);
    return 0;
}


Measured memory_bytes: 4588