#include <iostream>
#include <limits>
#include <cfenv>
#include <cmath>
#include <algorithm>
#include <array>
#include <bitset>
#include <cstring>
#include <map>
#include <stack>
#include <set>
#include <tuple>
#include <queue>
#include <vector>
#include <cmath>
#include <random>
#include <math.h>
#include <list>
#include <random>
#include <functional>


#define FOR(i, a, b) for(int (i) = (a); (i) < (b); ++(i))
#define REP(i, n) FOR(i, 0, n)
#define rREP(i, n) for(int (i) = (n) - 1; (i) >= 0; --(i))
#define ALL(TheArray) TheArray.begin(), TheArray.end()

using lli = long long int;
using pii = std::pair<int, int>;

template <class T> inline bool chmax(T& a, T b){
    if(a < b){a = b; return true;}
    return false;
}
template <class T> inline bool chmin(T& a, T b){
    if(a > b){a = b; return true;}
    return false;
}


// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


constexpr long double EPS = 1e-8;
constexpr int inf = 2e9;
constexpr std::pair<int, int> id(inf, -inf);
std::array<std::pair<int, int>, 3> X{id, id, id}, Y{id, id, id};

void update(std::pair<int, int>& p, int v){
    if(p.first > v) p.first = v;
    if(p.second < v) p.second = v;
}

long double area(long double t){
    long double xmin = X[2].first, xmax = X[2].second;
    long double ymin = Y[2].first, ymax = Y[2].second;
    if(X[0].first  + t < xmin) xmin = X[0].first  + t;
    if(X[0].second + t > xmax) xmax = X[0].second + t;
    if(X[1].first  - t < xmin) xmin = X[1].first  - t;
    if(X[1].second - t > xmax) xmax = X[1].second - t;

    if(Y[0].first  + t < ymin) ymin = Y[0].first  + t;
    if(Y[0].second + t > ymax) ymax = Y[0].second + t;
    if(Y[1].first  - t < ymin) ymin = Y[1].first  - t;
    if(Y[1].second - t > ymax) ymax = Y[1].second - t;
    if(std::abs(xmax - xmin) < EPS) return 0;
    if(std::abs(ymax - ymin) < EPS) return 0;
    return (xmax - xmin) * (ymax - ymin);
}

void upd(long double& res, int x1, int x2, int p1, int p2){
    if(p1 == p2) return;
    long double t = (x2 - x1); t /= (p1 - p2);
    if(t < 0) return;
    long double S = area(t);
    if(res > S) res = S;
}

int main(void){
    int n; scanf("%d", &n);
    REP(i, n){
        int x, y; char c; scanf("%d%d %c", &x, &y, &c);
        switch (c)
        {
        case 'R':
            update(X[0], x);
            update(Y[2], y);
            break;
        case 'L':
            update(X[1], x);
            update(Y[2], y);
            break;
        case 'U':
            update(Y[0], y);
            update(X[2], x);
            break;
        case 'D':
            update(Y[1], y);
            update(X[2], x);
            break;
        }
    }
    long double res = area(0);
    upd(res, X[0].first,  X[1].first,  1, -1);
    upd(res, X[0].second, X[1].second, 1, -1);
    upd(res, Y[0].first,  Y[1].first,  1, -1);
    upd(res, Y[0].second, Y[1].second, 1, -1);
  
    upd(res, X[0].first,  X[2].first,  1, 0);
    upd(res, X[0].second, X[2].second, 1, 0);
    upd(res, Y[0].first,  Y[2].first,  1, 0);
    upd(res, Y[0].second, Y[2].second, 1, 0);
  
    upd(res, X[1].first,  X[2].first,  -1, 0);
    upd(res, X[1].second, X[2].second, -1, 0);
    upd(res, Y[1].first,  Y[2].first,  -1, 0);
    upd(res, Y[1].second, Y[2].second, -1, 0);
    printf("%.16Lf\n", res);

    

    return 0;
}

Measured memory_bytes: 256