#include <iostream>
#include <iomanip>
#include <vector>
#include <functional>
#include <cmath>
#include <tuple>

double golden_selection_search(double t_min, double t_max, const std::function<double(double)>& test_func){
  const double phi = 0.5*(1.0+std::sqrt(5.0));
  const double phi_1 = 1.0/(phi+1.0);
  double t_m1 = t_min+phi_1*(t_max-t_min);
  double t_m2 = t_max+phi_1*(t_min-t_max);
  double v1 = test_func(t_m1);
  double v2 = test_func(t_m2);
  while(true){
    if(v1 < v2){
      t_max = t_m2;
      t_m2 = t_m1;
      v2 = v1;
      t_m1 = t_min+phi_1*(t_max-t_min);
      v1 = test_func(t_m1);
    }else{
      t_min = t_m1;
      t_m1 = t_m2;
      v1 = v2;
      t_m2 = t_max+phi_1*(t_min-t_max);
      v2 = test_func(t_m2);
    }
    if((t_max-t_min) < 1.e-2){
      return 0.5*(t_max+t_min);
    }
  }
}

int main(){
  int N;
  std::cin >> N;
  double pr_min=1.e10, pl_min=1.e10, px_min=1.e10, pu_min=1.e10, pd_min=1.e10, py_min=1.e10;
  double pr_max=-1.e10, pl_max=-1.e10, px_max=-1.e10, pu_max=-1.e10, pd_max=-1.e10, py_max=-1.e10;
  for(int i = 0; i < N; i++){
    double x,y;
    char d;
    std::cin >> x >> y >> d;
    if(d == 'R'){pr_min = std::min(pr_min, x); pr_max = std::max(pr_max, x); py_min = std::min(py_min, y); py_max = std::max(py_max, y);}
    else if(d == 'L'){pl_min = std::min(pl_min, x); pl_max = std::max(pl_max, x); py_min = std::min(py_min, y); py_max = std::max(py_max, y);}
    else if(d == 'U'){pu_min = std::min(pu_min, y); pu_max = std::max(pu_max, y); px_min = std::min(px_min, x); px_max = std::max(px_max, x);}
    else{pd_min = std::min(pd_min, y); pd_max = std::max(pd_max, y); px_min = std::min(px_min, x); px_max = std::max(px_max, x);}
  }

  auto x_min = [&](const double t){return -std::min(std::min(pr_min+t, pl_min-t), px_min);};
  auto x_max = [&](const double t){return std::max(std::max(pr_max+t, pl_max-t), px_max);};

  auto y_min = [&](const double t){return -std::min(std::min(pu_min+t, pd_min-t), py_min);};
  auto y_max = [&](const double t){return std::max(std::max(pu_max+t, pd_max-t), py_max);};

  std::vector<double> event_time;
  event_time.push_back(golden_selection_search(0.0, 1.e10, [&](const double t){return x_min(t)+0.1*t;}));
  event_time.push_back(golden_selection_search(0.0, 1.e10, [&](const double t){return x_min(t)-0.1*t;}));
  event_time.push_back(golden_selection_search(0.0, 1.e10, [&](const double t){return x_max(t)+0.1*t;}));
  event_time.push_back(golden_selection_search(0.0, 1.e10, [&](const double t){return x_max(t)-0.1*t;}));
  event_time.push_back(golden_selection_search(0.0, 1.e10, [&](const double t){return y_min(t)+0.1*t;}));
  event_time.push_back(golden_selection_search(0.0, 1.e10, [&](const double t){return y_min(t)-0.1*t;}));
  event_time.push_back(golden_selection_search(0.0, 1.e10, [&](const double t){return y_max(t)+0.1*t;}));
  event_time.push_back(golden_selection_search(0.0, 1.e10, [&](const double t){return y_max(t)-0.1*t;}));

  double min_xy_rect = 1.e20;
  for(const auto& t: event_time){
    double t2 = std::floor(2*t+0.5)*0.5;
    min_xy_rect = std::min(min_xy_rect, (x_min(t2)+x_max(t2))*(y_min(t2)+y_max(t2)));
  }
  std::cout << std::fixed << std::setprecision(10) << min_xy_rect << std::endl;
  return 0;
}


Measured memory_bytes: 256