#include<iostream>
#include<iomanip>
#include<algorithm>
#include<vector>
using namespace std;
int N;
vector<pair<double,pair<double,int> > >calc(vector<int>x,vector<int>d)
{
	int eqmax=-1e9,eqmin=1e9,upmax=-1e9,upmin=1e9,downmax=-1e9,downmin=1e9;
	for(int i=0;i<N;i++)
	{
		if(d[i]==0)
		{
			eqmax=max(eqmax,x[i]);
			eqmin=min(eqmin,x[i]);
		}
		else if(d[i]==1)
		{
			upmax=max(upmax,x[i]);
			upmin=min(upmin,x[i]);
		}
		else
		{
			downmax=max(downmax,x[i]);
			downmin=min(downmin,x[i]);
		}
	}
	vector<pair<double,pair<double,int> > >mi,ma;
	if(eqmax>-1e9)
	{
		if(eqmax<downmax)
		{
			if(upmax>-1e9)
			{
				if(upmax<downmax)
				{
					double mit=(downmax-upmax)/2.0;
					if(downmax-mit<eqmax)
					{
						ma={{0,{downmax,-1}},{downmax-eqmax,{eqmax,0}},{eqmax-upmax,{eqmax,1}}};
					}
					else
					{
						ma={{0,{downmax,-1}},{mit,{downmax-mit,1}}};
					}
				}
				else
				{
					if(upmax<eqmax)
					{
						ma={{0,{eqmax,0}},{eqmax-upmax,{eqmax,1}}};
					}
					else
					{
						ma={{0,{upmax,1}}};
					}
				}
			}
			else
			{
				ma={{0,{downmax,-1}},{downmax-eqmax,{eqmax,0}}};
			}
		}
		else
		{
			if(upmax>-1e9)
			{
				if(eqmax>upmax)
				{
					ma={{0,{eqmax,0}},{eqmax-upmax,{eqmax,1}}};
				}
				else
				{
					ma={{0,{upmax,1}}};
				}
			}
			else
			{
				ma={{0,{eqmax,0}}};
			}
		}
	}
	else
	{
		if(downmax>-1e9)
		{
			if(upmax>-1e9)
			{
				if(upmax<downmax)
				{
					ma={{0,{downmax,-1}},{(downmax-upmax)/2.0,{(downmax+upmax)/2.0,1}}};
				}
				else
				{
					ma={{0,{upmax,1}}};
				}
			}
			else
			{
				ma={{0,{downmax,-1}}};
			}
		}
		else
		{
			ma={{0,{upmax,1}}};
		}
	}
	if(eqmin<1e9)
	{
		if(eqmin>upmin)
		{
			if(downmin<1e9)
			{
				if(downmin>upmin)
				{
					double mit=(downmin-upmin)/2.0;
					if(downmin-mit>eqmin)
					{
						mi={{0,{upmin,1}},{eqmin-upmin,{eqmin,0}},{downmin-eqmin,{eqmin,-1}}};
					}
					else
					{
						mi={{0,{upmin,1}},{mit,{downmin-mit,-1}}};
					}
				}
				else
				{
					if(downmin>eqmin)
					{
						mi={{0,{eqmin,0}},{downmin-eqmin,{eqmin,-1}}};
					}
					else
					{
						mi={{0,{downmin,-1}}};
					}
				}
			}
			else
			{
				mi={{0,{upmin,1}},{eqmin-upmin,{eqmin,0}}};
			}
		}
		else
		{
			if(downmin<1e9)
			{
				if(eqmin<downmin)
				{
					mi={{0,{eqmin,0}},{downmin-eqmin,{eqmin,-1}}};
				}
				else
				{
					mi={{0,{downmin,-1}}};
				}
			}
			else
			{
				mi={{0,{eqmin,0}}};
			}
		}
	}
	else
	{
		if(upmin<1e9)
		{
			if(downmin<1e9)
			{
				if(upmin<downmin)
				{
					mi={{0,{upmin,1}},{(downmin-upmin)/2.0,{(downmin+upmin)/2.0,-1}}};
				}
				else
				{
					mi={{0,{downmin,-1}}};
				}
			}
			else
			{
				mi={{0,{upmin,1}}};
			}
		}
		else
		{
			mi={{0,{downmin,-1}}};
		}
	}
	vector<pair<double,pair<double,int> > >ret;
	vector<double>epoc;
	for(int i=0;i<ma.size();i++)epoc.push_back(ma[i].first);
	for(int i=0;i<mi.size();i++)epoc.push_back(mi[i].first);
	sort(epoc.begin(),epoc.end());
	double M=ma[0].second.first,m=mi[0].second.first;
	int idM=0,idm=0;
	for(double nowt:epoc)
	{
		while(idM+1<ma.size()&&ma[idM+1].first<=nowt)
		{
			idM++;
			M=ma[idM].second.first;
		}
		while(idm+1<mi.size()&&mi[idm+1].first<=nowt)
		{
			idm++;
			m=mi[idm].second.first;
		}
		M+=(nowt-ma[idM].first)*ma[idM].second.second;
		m+=(nowt-mi[idm].first)*mi[idm].second.second;
		ret.push_back(make_pair(nowt,make_pair(M-m,ma[idM].second.second-mi[idm].second.second)));
	}
	return ret;
}
main()
{
	cin>>N;
	vector<int>x,y;
	vector<char>d;
	for(int i=0;i<N;i++)
	{
		int a,b;char c;cin>>a>>b>>c;
		x.push_back(a);
		y.push_back(b);
		d.push_back(c);
	}
	vector<int>E(N);
	for(int i=0;i<N;i++)
	{
		E[i]=d[i]=='L'?-1:d[i]=='R'?1:0;
	}
	vector<pair<double,pair<double,int> > >A=calc(x,E);
	for(int i=0;i<N;i++)
	{
		E[i]=d[i]=='D'?-1:d[i]=='U'?1:0;
	}
	vector<pair<double,pair<double,int> > >B=calc(y,E);
	vector<double>T;
	for(pair<double,pair<double,int> >p:A)T.push_back(p.first);
	for(pair<double,pair<double,int> >p:B)T.push_back(p.first);
	sort(T.begin(),T.end());
	double ans=1e150;
	int ia=0,ib=0;
	for(double nowt:T)
	{
		double xm=1e150,xM=-1e150,ym=1e150,yM=-1e150;
		for(int i=0;i<N;i++)
		{
			xm=min(xm,nowt*(d[i]=='L'?-1:d[i]=='R'?1:0)+x[i]);
			xM=max(xM,nowt*(d[i]=='L'?-1:d[i]=='R'?1:0)+x[i]);
			ym=min(ym,nowt*(d[i]=='D'?-1:d[i]=='U'?1:0)+y[i]);
			yM=max(yM,nowt*(d[i]=='D'?-1:d[i]=='U'?1:0)+y[i]);
		}
		ans=min(ans,(xM-xm)*(yM-ym));
	}
	cout<<fixed<<setprecision(9)<<ans<<endl;
}


Measured memory_bytes: 2420