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

#include <math.h>

using namespace std;

#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector")

typedef long double ld;

typedef long long ll;



struct Point {

    ll x, y, x1 = 0, y1 = 0;

    

    Point() {}

    

    Point(ll _x, ll _y, char c) {

        x = _x;

        y = _y;

        if (c == 'U') {

            y1 = 1;

        } else if (c == 'D') {

            y1 = -1;

        } else if (c == 'R') {

            x1 = 1;

        } else {

            x1 = -1;

        }

    }

};



vector<Point> vc;



ld dist(ld t) {

    ld max_x = -1e9, max_y = -1e9, min_x = 1e9, min_y = 1e9;

    for (auto p : vc) {

        ld xx = p.x + p.x1 * t;

        ld yy = p.y + p.y1 * t;

        max_x = max(max_x, xx);

        max_y = max(max_y, yy);

        min_x = min(min_x, xx);

        min_y = min(min_y, yy);

    }

    return (max_x - min_x) * (max_y - min_y);

}



int main() {

#ifdef LOCAL

    freopen("in", "r", stdin);

    freopen("out", "w", stdout);

#endif

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);

    cout.precision(20);

    int n;

    cin >> n;

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

        ll x, y;

        char c;

        cin >> x >> y >> c;

        vc.push_back(Point(x, y, c));

    }

    ld l = 0, r = 1e11;

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

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

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

        ld a1 = dist(m1);

        ld a2 = dist(m2);

        if (a1 > a2) {

            l = m1;

        } else {

            r = m2;

        }

    }

    cout << fixed << min(dist(l), dist(r));

    return 0;

}


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

#include <ext/pb_ds/assoc_container.hpp>

#include <ext/pb_ds/tree_policy.hpp>

#include <random>

#include <chrono>



using namespace std;

using namespace __gnu_pbds;



#define endl '\n'



typedef long long ll;

typedef pair<int, int> pii;

//typedef tree<int,null_type,less<int>,rb_tree_tag, tree_order_statistics_node_update> indexed_set;



//mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());



const double oo = 1e11;

const int maxn = 1e5 + 5;



ll x[maxn], y[maxn];

ll vx[maxn], vy[maxn];

int n;





double f(double t){

	

	double mnX = oo, mxX = -oo, mnY = oo, mxY = -oo;

	

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

		double nx = 1.0 * x[i] + 1.0 * t * vx[i];

		double ny = 1.0 * y[i] + 1.0 * t * vy[i];

		

		mnX = min(mnX, nx);

		mxX = max(mxX, nx);

		mnY = min(mnY, ny);

		mxY = max(mxY, ny);

	}

	

	return (mxX - mnX) * (mxY - mnY);

}



int main(){

	ios_base::sync_with_stdio(0);

	cin.tie(0);



	//freopen("input.txt", "r", stdin);

	//freopen("output.txt", "w", stdout);

	

	cin >> n;

	

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

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

		char c;

		cin >> c;

		

		if(c == 'U')

			vy[i] = +1;

		if(c == 'D')

			vy[i] = -1;

		if(c == 'R')

			vx[i] = +1;

		if(c == 'L')

			vx[i] = -1; 

	}

	

	double lo = 0.0, hi = oo;

	

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

		double third = (hi - lo) / 3.0;

		double p1 = lo + third;

		double p2 = hi - third;

		

		if(f(p1) < f(p2))

			hi = p2;

		else

			lo = p1;

	}

	

	cout << setprecision(10) << fixed;

	cout << f(lo) << endl;



	return 0;

}