#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

vector<int> x_0, x_1, x_2;
vector<int> y_0, y_1, y_2;

void formata(vector<int>& v){

	sort(v.begin(), v.end());

	while(v.size() > 2){
		int x = v.back();
		v.pop_back();
		v.pop_back();
		v.push_back(x);
	}

}

double calcula(double t){

	vector<double> x, y;

	for(int v : x_0){
		x.push_back(v);
	} 
	for(int v : x_1){
		x.push_back(v + t);
	}
	for(int v : x_2){
		x.push_back(v + 2*t);
	}
	for(int u : y_0){
		y.push_back(u);
	}
	for(int u : y_1){
		y.push_back(u + t);
	}
	for(int u : y_2){
		y.push_back(u + 2*t);
	}

	sort(x.begin(), x.end());
	sort(y.begin(), y.end());
	//printf("T %lf (%lf - %lf)*(%lf - %lf) = %lf\n", t, x.back(), x[0], y.back(), y[0], (x.back() - x[0])*(y.back() - y[0]));

	return (x.back() - x[0])*(y.back() - y[0]);

}

double inter(int a, int b, double c){
	return (a-b)/c;
}

int main(){
	
	int N;
	
	scanf("%d", &N);
	for(int i = 0; i < N; i++){

		int x, y;
		char d;

		scanf("%d %d %c", &x, &y, &d);

		if(d == 'R'){
			x_2.push_back(x);
			y_1.push_back(y);
		}
		else if(d == 'L'){
			x_0.push_back(x);
			y_1.push_back(y);
		}
		else if(d == 'U'){
			x_1.push_back(x);
			y_2.push_back(y);
		}
		else if(d == 'D'){
			x_1.push_back(x);
			y_0.push_back(y);
		}

	}

	formata(x_0);
	formata(x_1);
	formata(x_2);
	formata(y_0);
	formata(y_1);
	formata(y_2);

	/*
	for(int i : x_0){
		printf("X0 %d\n",i);
	}
	for(int i : x_1){
		printf("X1 %d\n",i);
	}
	for(int i : x_2){
		printf("X2 %d\n",i);
	}
	for(int i : y_0){
		printf("y0 %d\n",i);
	}
	for(int i : y_1){
		printf("y1 %d\n",i);
	}
	for(int i : y_2){
		printf("y2 %d\n",i);
	}
	*/

	vector<ll> tempos;
	if(!x_0.empty() && !x_1.empty()){
		tempos.push_back(inter(x_0[0], x_1[0], 1));
		tempos.push_back(inter(x_0[0], x_1.back(), 1));
		tempos.push_back(inter(x_0.back(), x_1[0], 1));
		tempos.push_back(inter(x_0.back(), x_1.back(), 1));
	}
	if(!x_0.empty() && !x_2.empty()){
		tempos.push_back(inter(x_0[0], x_2[0], 2.0));
		tempos.push_back(inter(x_0[0], x_2.back(), 2.0));
		tempos.push_back(inter(x_0.back(), x_2[0], 2.0));
		tempos.push_back(inter(x_0.back(), x_2.back(), 2.0));
	}
	if(!x_1.empty() && !x_2.empty()){
		tempos.push_back(inter(x_1[0], x_2[0], 1));
		tempos.push_back(inter(x_1[0], x_2.back(), 1));
		tempos.push_back(inter(x_1.back(), x_2[0], 1));
		tempos.push_back(inter(x_1.back(), x_2.back(), 1));
	}

	if(!y_0.empty() && !y_1.empty()){
		tempos.push_back(inter(y_0[0], y_1[0], 1));
		tempos.push_back(inter(y_0[0], y_1.back(), 1));
		tempos.push_back(inter(y_0.back(), y_1[0], 1));
		tempos.push_back(inter(y_0.back(), y_1.back(), 1));
	}
	if(!y_0.empty() && !y_2.empty()){
		tempos.push_back(inter(y_0[0], y_2[0], 2.0));
		tempos.push_back(inter(y_0[0], y_2.back(), 2.0));
		tempos.push_back(inter(y_0.back(), y_2[0], 2.0));
		tempos.push_back(inter(y_0.back(), y_2.back(), 2.0));
	}
	if(!y_1.empty() && !y_2.empty()){
		tempos.push_back(inter(y_1[0], y_2[0], 1));
		tempos.push_back(inter(y_1[0], y_2.back(), 1));
		tempos.push_back(inter(y_1.back(), y_2[0], 1));
		tempos.push_back(inter(y_1.back(), y_2.back(), 1));
	}

	vector<double> possiveis;
	tempos.push_back(0);
	for(double t : tempos){
		if(t >= 0) possiveis.push_back(calcula(t));
		if(t + 0.5 >= 0) possiveis.push_back(calcula(t + 0.5));
		if(t - 0.5 >= 0) possiveis.push_back(calcula(t - 0.5));
	}

	sort(possiveis.begin(), possiveis.end());

	double resultado = possiveis[0];
	printf("%lf\n", resultado);

	return 0;

}

Measured memory_bytes: 1272