#include<iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <map>
#include <cstring>
#include <string>
typedef long long ll;
using namespace std;
int n,x[100005],y[100005],d[100005];
char ch[]="RLUD";
int dx[]={1,-1,0,0},dy[]={0,0,1,-1};
const unsigned int mo=1e9+7;
double ans=9e99;
bool tra(long double t,int md){
	double max=x[0]+t*dx[d[0]],mix=max,may=y[0]+t*dy[d[0]],miy=may;
	ll nmax=0,nmix=0,nmay=0,nmiy=0;
	for(int i=1;i<n;++i){
		long double X=x[i]+t*dx[d[i]],Y=y[i]+t*dy[d[i]];
		if(X>max)nmax=i,max=X;
		if(X<mix)nmix=i,mix=X;
		if(Y>may)nmay=i,may=Y;
		if(Y<miy)nmiy=i,miy=Y;
	}
	//cout<<max<<may<<mix<<miy<<endl;
	ans=min(ans,(max-mix)*(may-miy));
	int p;
	if(md&4) md-=4,p=dx[d[nmax]]-dx[d[nmix]];
	else p=dy[d[nmay]]-dy[d[nmiy]];
	return p<md-1;
}
int main(){
	scanf("%d",&n);
	for(int i=0;i<n;++i){
		char tp;
		scanf("%d%d %c",x+i,y+i,&tp);
		for(int j=0;j<4;++j){
			if(ch[j]==tp){
				//cout<<j<<endl;
				d[i]=j;break;
			}
		}
	}
	for(int mode=0;mode<8;++mode){
		long double l=0,r=2e8;
		for(int i=0;i<130;++i){
			double mid=(l+r)/2;
			//printf("%.39lf\n",mid);
			if(tra(mid,mode))l=mid;
			else r=mid;
			//printf("%.39lf\n",(double)ans);
		}
	}
	printf("%.17lf\n",ans);
	return 0;
} 
/*
3
-1000 0 U
1000 0 L
-1900 0 R
*/