using System;
using System.Collections.Generic;
using System.Collections;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using System.IO;
using System.Reflection;
using static System.Math;
using System.Numerics;
static class Program{
	const int mod=(int)1e9+7;
	static double[][] h;
	static void Main(){
		Sc sc=new Sc();
		var n=sc.I;
		var a=sc.Arr(n,(x)=>new Tuple<double,double,char>(double.Parse(x[0]),double.Parse(x[1]),x[2].ToCharArray()[0]));
		h=new double[][]{
			new double[]{1L<<50,-1L<<50},
			new double[]{1L<<50,-1L<<50},
			new double[]{1L<<50,-1L<<50},
			new double[]{1L<<50,-1L<<50},
			new double[]{1L<<50,-1L<<50},
			new double[]{1L<<50,-1L<<50}
		};
		for(int i = 0;i<n;i++) {
			if(a[i].Item3=='U'){
				h[0][0]=Min(h[0][0],a[i].Item2);
				h[0][1]=Max(h[0][1],a[i].Item2);
				h[5][0]=Min(h[5][0],a[i].Item1);
				h[5][1]=Max(h[5][1],a[i].Item1);
			}
			else if(a[i].Item3=='D'){
				h[1][0]=Min(h[1][0],a[i].Item2);
				h[1][1]=Max(h[1][1],a[i].Item2);
				h[5][0]=Min(h[5][0],a[i].Item1);
				h[5][1]=Max(h[5][1],a[i].Item1);
			}
			else if(a[i].Item3=='R'){
				h[3][0]=Min(h[3][0],a[i].Item1);
				h[3][1]=Max(h[3][1],a[i].Item1);
				h[2][0]=Min(h[2][0],a[i].Item2);
				h[2][1]=Max(h[2][1],a[i].Item2);
			}
			else{
				h[4][0]=Min(h[4][0],a[i].Item1);
				h[4][1]=Max(h[4][1],a[i].Item1);
				h[2][0]=Min(h[2][0],a[i].Item2);
				h[2][1]=Max(h[2][1],a[i].Item2);
			}
		}
		var li=new List<double>();
		for(int i = 0;i<4;i+=3) {
			li.Add(h[i+1][1]-h[i+2][1]);
			li.Add((h[i+1][1]-h[i][1])/2);
			li.Add(h[i+2][1]-h[i][1]);
			li.Add(h[i+1][0]-h[i+2][0]);
			li.Add((h[i+1][0]-h[i][0])/2);
			li.Add(h[i+2][0]-h[i][0]);
		}
		li.Add(0);
		double ans=double.MaxValue;
		for(int i = 0;i<li.Count;i++) {
			if(li[i]>=0&&li[i]<1L<<40){ans=Min(Fu(li[i]),ans);}
		}
		Console.WriteLine("{0}",ans);
	}
	static double Fu(double i){
		return (Max(Max(h[0][1]+i,h[1][1]-i),h[2][1])-Min(Min(h[0][0]+i,h[1][0]-i),h[2][0]))*(Max(Max(h[3][1]+i,h[4][1]-i),h[5][1])-Min(Min(h[3][0]+i,h[4][0]-i),h[5][0]));
	}
}

public class Sc{
	public int I{get{return int.Parse(Console.ReadLine());}}
	public long L{get{return long.Parse(Console.ReadLine());}}
	public double D{get{return double.Parse(Console.ReadLine());}}
	public string S{get{return Console.ReadLine();}}
	public int[] Ia{get{return Array.ConvertAll(Console.ReadLine().Split(),int.Parse);}}
	public long[] La{get{return Array.ConvertAll(Console.ReadLine().Split(),long.Parse);}}
	public double[] Da{get{return Array.ConvertAll(Console.ReadLine().Split(),double.Parse);}}
	public string[] Sa{get{return Console.ReadLine().Split();}}
	public object[] Oa{get{return Console.ReadLine().Split();}}
	public int[] Ia2{get{return Array.ConvertAll(("0 "+Console.ReadLine()+" 0").Split(),int.Parse);}}
	public int[] Ia3(int a){return Array.ConvertAll((a.ToString()+" "+Console.ReadLine()).Split(),int.Parse);}
	public int[] Ia3(bool a,int b,bool c,int d){return Array.ConvertAll(((a?b.ToString()+" ":"")+Console.ReadLine()+(c?" "+d.ToString():"")).Split(),int.Parse);}
	public long[] La2{get{return Array.ConvertAll(("0 "+Console.ReadLine()+" 0").Split(),long.Parse);}}
	public long[] La3(int a){return Array.ConvertAll((a.ToString()+" "+Console.ReadLine()).Split(),long.Parse);}
	public long[] La3(bool a,int b,bool c,int d){return Array.ConvertAll(((a?b.ToString()+" ":"")+Console.ReadLine()+(c?" "+d.ToString():"")).Split(),long.Parse);}
	public T[] Arr<T>(int n,Func<T> f){var a=new T[n];for(int i=0;i<n;i++){a[i]=f();}return a;}
	public T[] Arr<T>(int n,Func<int,T> f){var a=new T[n];for(int i=0;i<n;i++){a[i]=f(i);}return a;}
	public T[] Arr<T>(int n,Func<string[],T> f){var a=new T[n];for(int i=0;i<n;i++){a[i]=f(Console.ReadLine().Split());}return a;}
	public T[] Arr<T>(int n,Func<int,string[],T> f){var a=new T[n];for(int i=0;i<n;i++){a[i]=f(i,Console.ReadLine().Split());}return a;}
}


Measured memory_bytes: 23872