#include <bits/stdc++.h>
#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
typedef long long ll;
typedef long double ld;
#define pb push_back
#define mp make_pair
#define MOD 1000000007
#define INF LLONG_MAX

using namespace std;

struct coor
{
    ld x,y;
    char d;
};

int main()
{
   FAST/**/
   
   ll n;
   cin>>n;
   
   coor arr[n];
   for(ll i=0;i<n;i++)
       cin>>arr[i].x>>arr[i].y>>arr[i].d;
   
   vector<ld> tim;
   tim.pb(0);
   
   ld ymax = -INF;
   ld ymin = INF;
   ld xmax = -INF, xmin = INF;
   //cout<<ymax<<"\n";
   
   for(ll i = 0;i<n;i++)
   {
       if(arr[i].d == 'U' || arr[i].d == 'D')
            xmax = max(xmax, arr[i].x), xmin = min(xmin, arr[i].x);
       else 
            ymax = max(ymax, arr[i].y), ymin = min(ymin, arr[i].y);
   }
   
   vector<ll> hold[4];              //0 - up
                                    //1 - down
                                    //2 - left
                                    //3 - right
   for(ll i=0;i<n;i++)
   {
       if(arr[i].d == 'U')
            hold[0].pb(arr[i].y);
       else if(arr[i].d == 'D')
            hold[1].pb(arr[i].y);
       else if(arr[i].d == 'L')
            hold[2].pb(arr[i].x);
       else hold[3].pb(arr[i].x);
   }
   
   for(ll i=0;i<4;i++)
        sort(hold[i].begin(), hold[i].end());
   
   
   if(hold[0].size()!=0 && hold[1].size()!=0)
   {
       ll a,b,c,d;
       a = *hold[0].begin(),b=*hold[0].rbegin(),c=*hold[1].begin(), d=*hold[1].rbegin();
       
       ll c1[2], c2[2];
       c1[0] = a, c1[1] = b;
       c2[0] = c, c2[1] = d;
       
       for(ll i=0;i<2;i++)
            for(ll j=0;j<2;j++)
            {
                ll temp = c2[j] - c1[i];
                if(temp<=0)
                    continue;
                ld tempo = temp;
                tempo/=2.0;
                tim.pb(tempo);
            }
   }
   
   if(hold[2].size()!=0 && hold[3].size()!=0)
   {
       ll a,b,c,d;
       a = *hold[3].begin(),b=*hold[3].rbegin(),c=*hold[2].begin(), d=*hold[2].rbegin();
       
       ll c1[2], c2[2];
       c1[0] = a, c1[1] = b;
       c2[0] = c, c2[1] = d;
       
       for(ll i=0;i<2;i++)
            for(ll j=0;j<2;j++)
            {
                ll temp = c2[j] - c1[i];
                if(temp<=0)
                    continue;
                ld tempo = temp;
                tempo/=2.0;
                tim.pb(tempo);
            }
   }
   
   for(ll i=0;i<4;i++)
   {
       if(i == 0 && hold[0].size()>0)
       {
           tim.pb(max((ld)0,ymax - *hold[0].begin()));
           tim.pb(max((ld)0,ymin - *hold[0].begin()));
           tim.pb(max((ld)0,ymin - *hold[0].rbegin()));
           tim.pb(max((ld)0,ymax - *hold[0].rbegin()));
       }
       
       else if(i == 1 && hold[1].size()>0)
       {
           tim.pb(max((ld)0,-ymax + *hold[1].begin()));
           tim.pb(max((ld)0,-ymin + *hold[1].begin()));
           tim.pb(max((ld)0,-ymin + *hold[1].rbegin()));
           tim.pb(max((ld)0,-ymax + *hold[1].rbegin()));
       }
       
       else if(i == 2 && hold[2].size()>0)
       {
           tim.pb(max((ld)0,-xmax + *hold[2].begin()));
           tim.pb(max((ld)0,-xmin + *hold[2].begin()));
           tim.pb(max((ld)0,-xmin + *hold[2].rbegin()));
           tim.pb(max((ld)0,-xmax + *hold[2].rbegin()));
       }
       
       else if(i == 3 && hold[3].size()>0)
       {
           tim.pb(max((ld)0,xmax - *hold[3].begin()));
           tim.pb(max((ld)0,xmin - *hold[3].begin()));
           tim.pb(max((ld)0,xmin - *hold[3].rbegin()));
           tim.pb(max((ld)0,xmax - *hold[3].rbegin()));
       }
   }
   
   ld ans = LLONG_MAX;
   /*for(ll i=0;i<tim.size();i++)
        cout<<tim[i]<<" ";
   cout<<"\n";      */
   
   //cout<<xmin<<" "<<ymin<<" "<<xmax<<" "<<ymax<<"\n";
   
   for(ll i=0;i<tim.size();i++)
   {
       ld x1,x2,y1,y2;
       x1 = xmax,x2=xmin,y1=ymax,y2=ymin;
       
       for(ll j=0;j<n;j++)
       {
           if(arr[j].d=='U')
           {
               ld ty1 = arr[j].y + tim[i];
               //ld ty2 = arr[j].y + tim[i];
               
               y1 = max({y1,ty1});
               y2 = min({y2,ty1});               
           }
           
           else if(arr[j].d == 'D')
           {
               ld ty1 = arr[j].y - tim[i];
               //ld ty2 = arr[j].y + tim[i];
               
               y1 = max({y1,ty1});
               y2 = min({y2,ty1}); 
           }
           
           else if(arr[j].d == 'L')
           {
               ld ty1 = arr[j].x - tim[i];
               //ld ty2 = arr[j].y + tim[i];
               
               x1 = max({x1,ty1});
               x2 = min({x2,ty1}); 
           }
           
           else
           {
               ld ty1 = arr[j].x + tim[i];
               //ld ty2 = arr[j].y + tim[i];
               
               x1 = max({x1,ty1});
               x2 = min({x2,ty1}); 
           }
       }
       
       ld t1 = (y1-y2);
       ld t2 = x1-x2;
       
       if(t1<0 || t2<0)
            continue;
       
       if(t1 == 0 || t2 == 0)
       {
           //cout<<"at time "<<tim[i]<<"\n";
           ans = 0;
           break;
       }
       
       if(t1>=(LLONG_MAX)/t2)
            continue;
       ans = min(ans, t1*t2);
   }
   
   cout<<fixed<<setprecision(20)<<ans;
   
   
    
   return 0;
}

Measured memory_bytes: 6012