#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;

ll N;

ll RLymax = LLONG_MIN;
ll RLymin = LLONG_MAX;
ll UDxmax = LLONG_MIN;
ll UDxmin = LLONG_MAX;

ll Lxmax = LLONG_MIN;
ll Lxmin = LLONG_MAX;
ll Rxmax = LLONG_MIN;
ll Rxmin = LLONG_MAX;

ll Uymax = LLONG_MIN;
ll Uymin = LLONG_MAX;
ll Dymax = LLONG_MIN;
ll Dymin = LLONG_MAX;

double dx( double t ){
	double xmin =  numeric_limits<double>::quiet_NaN();
	double xmax =  numeric_limits<double>::quiet_NaN();
	
	if ( UDxmin != LLONG_MAX ){
		if ( std::isnan(xmin) ) xmin = UDxmin;
		else                    xmin = min(xmin,(double)UDxmin);
		if ( std::isnan(xmax) ) xmax = UDxmax;
		else                    xmax = max(xmax,(double)UDxmax);
	}
	
	if ( Lxmin != LLONG_MAX ){
		if ( std::isnan(xmin) ) xmin = Lxmin - t;
		else                    xmin = min(xmin,(double)Lxmin - t);
		if ( std::isnan(xmax) ) xmax = Lxmax - t;
		else                    xmax = max(xmax,(double)Lxmax - t);
	}
	
	if ( Rxmin != LLONG_MAX ){
		if ( std::isnan(xmin) ) xmin = Rxmin + t;
		else                    xmin = min(xmin,(double)Rxmin + t);
		if ( std::isnan(xmax) ) xmax = Rxmax + t;
		else                    xmax = max(xmax,(double)Rxmax + t);
	}
	
	return xmax-xmin;
}

double dy( double t ){
	double ymin =  numeric_limits<double>::quiet_NaN();
	double ymax =  numeric_limits<double>::quiet_NaN();
	
	if ( RLymin != LLONG_MAX ){
		if ( std::isnan(ymin) ) ymin = RLymin;
		else                    ymin = min(ymin,(double)RLymin);
		if ( std::isnan(ymax) ) ymax = RLymax;
		else                    ymax = max(ymax,(double)RLymax);
	}
	
	if ( Dymin != LLONG_MAX ){
		if ( std::isnan(ymin) ) ymin = Dymin - t;
		else                    ymin = min(ymin,(double)Dymin - t);
		if ( std::isnan(ymax) ) ymax = Dymax - t;
		else                    ymax = max(ymax,(double)Dymax - t);
	}
	
	if ( Uymin != LLONG_MAX ){
		if ( std::isnan(ymin) ) ymin = Uymin + t;
		else                    ymin = min(ymin,(double)Uymin + t);
		if ( std::isnan(ymax) ) ymax = Uymax + t;
		else                    ymax = max(ymax,(double)Uymax + t);
	}
	
	return ymax-ymin;
}



int main(){
	cin >> N;
	
	
	for ( int i = 0; i < N; i++ ){
		ll x, y;
		string d;
		
		cin >> x >> y >> d;
		if ( d == "L" || d == "R" ){
			RLymax = max(RLymax,y);
			RLymin = min(RLymin,y);
			if ( d == "L" ){
				Lxmax = max(Lxmax,x);
				Lxmin = min(Lxmin,x);
			}
			if ( d == "R" ){
				Rxmax = max(Rxmax,x);
				Rxmin = min(Rxmin,x);
			}
		}
		if ( d == "U" || d == "D" ){
			UDxmax = max(UDxmax,x);
			UDxmin = min(UDxmin,x);
			if ( d == "U" ){
				Uymax = max(Uymax,y);
				Uymin = min(Uymin,y);
			}
			if ( d == "D" ){
				Dymax = max(Dymax,y);
				Dymin = min(Dymin,y);
			}
		}
	}
	
	double tmin = 0.0;
	double tmax = 1000000000.0;
	
	while ( true ){
		double ta = tmin + (tmax-tmin)/4.0;
		double tb = tmax - (tmax-tmin)/4.0;
		if ( ta == tmin || tb == tmax ){
			break;
		}
		
		double fa = dx(ta) * dy(ta);
		double fb = dx(tb) * dy(tb);
		
		//cout << std::fixed << setprecision(12) << ta << "/" << tb << " :" << dx(ta) << " " << dy(ta) << endl;
		if ( fa < fb ) tmax = tb;
		else           tmin = ta;
	}
	
	
	cout << std::fixed << setprecision(12) << dx(tmin) * dy(tmin) << endl;
	
	return 0;
}



Measured memory_bytes: 256