#include <bits/stdc++.h>
using namespace std;
static const int INF = 1000000000;
double solve(double t, double xmax, double xmin, double ymax, double ymin,
             map<string, vector<int>>& vv) {
  vector<pair<int, int>> v;
  {
    vector<int> w = vv["D"];
    for (int i = (0); i < (int)(w.size()); i++) {
      ymin = min(ymin, w[i] - t);
      ymax = max(ymax, w[i] - t);
    }
  }
  {
    vector<int> w = vv["U"];
    for (int i = (0); i < (int)(w.size()); i++) {
      ymin = min(ymin, w[i] + t);
      ymax = max(ymax, w[i] + t);
    }
  }
  {
    vector<int> w = vv["L"];
    for (int i = (0); i < (int)(w.size()); i++) {
      xmin = min(xmin, w[i] - t);
      xmax = max(xmax, w[i] - t);
    }
  }
  {
    vector<int> w = vv["R"];
    for (int i = (0); i < (int)(w.size()); i++) {
      xmin = min(xmin, w[i] + t);
      xmax = max(xmax, w[i] + t);
    }
  }
  double diffx = xmax - xmin;
  double diffy = ymax - ymin;
  return diffx * diffy;
}
int main() {
  int N;
  cin >> N;
  map<string, vector<pair<int, int>>> v;
  for (int i = (0); i < (int)(N); i++) {
    int x, y;
    string d;
    cin >> x >> y >> d;
    v[d].emplace_back(x, y);
  }
  int c_y_max = -INF;
  int c_y_min = INF;
  {
    vector<pair<int, int>> w = v["L"];
    for (int i = (0); i < (int)(w.size()); i++) {
      c_y_max = max(c_y_max, w[i].second);
      c_y_min = min(c_y_min, w[i].second);
    }
  }
  {
    vector<pair<int, int>> w = v["R"];
    for (int i = (0); i < (int)(w.size()); i++) {
      c_y_max = max(c_y_max, w[i].second);
      c_y_min = min(c_y_min, w[i].second);
    }
  }
  int c_x_max = -INF;
  int c_x_min = INF;
  {
    vector<pair<int, int>> w = v["U"];
    for (int i = (0); i < (int)(w.size()); i++) {
      c_x_max = max(c_x_max, w[i].first);
      c_x_min = min(c_x_min, w[i].first);
    }
  }
  {
    vector<pair<int, int>> w = v["D"];
    for (int i = (0); i < (int)(w.size()); i++) {
      c_x_max = max(c_x_max, w[i].first);
      c_x_min = min(c_x_min, w[i].first);
    }
  }
  map<string, vector<int>> vv;
  {
    vector<pair<int, int>> w = v["U"];
    int min_y = INF, max_y = -INF;
    for (int i = (0); i < (int)(w.size()); i++) {
      max_y = max(max_y, w[i].second);
      min_y = min(min_y, w[i].second);
    }
    if (min_y != INF) vv["U"].push_back(min_y);
    if (max_y != -INF) vv["U"].push_back(max_y);
  }
  {
    vector<pair<int, int>> w = v["D"];
    int min_y = INF, max_y = -INF;
    for (int i = (0); i < (int)(w.size()); i++) {
      max_y = max(max_y, w[i].second);
      min_y = min(min_y, w[i].second);
    }
    if (min_y != INF) vv["D"].push_back(min_y);
    if (max_y != -INF) vv["D"].push_back(max_y);
  }
  {
    vector<pair<int, int>> w = v["L"];
    int min_x = INF, max_x = -INF;
    for (int i = (0); i < (int)(w.size()); i++) {
      max_x = max(max_x, w[i].first);
      min_x = min(min_x, w[i].first);
    }
    if (min_x != INF) vv["L"].push_back(min_x);
    if (max_x != -INF) vv["L"].push_back(max_x);
  }
  {
    vector<pair<int, int>> w = v["R"];
    int min_x = INF, max_x = -INF;
    for (int i = (0); i < (int)(w.size()); i++) {
      max_x = max(max_x, w[i].first);
      min_x = min(min_x, w[i].first);
    }
    if (min_x != INF) vv["R"].push_back(min_x);
    if (max_x != -INF) vv["R"].push_back(max_x);
  }
  set<double> cand_t;
  cand_t.insert(0);
  {
    vector<pair<int, int>> w = v["U"];
    for (int i = (0); i < (int)(w.size()); i++) {
      if (c_y_max > w[i].second) {
        cand_t.insert(c_y_max - w[i].second);
      }
      if (c_y_min > w[i].second) {
        cand_t.insert(c_y_min - w[i].second);
      }
    }
  }
  {
    vector<pair<int, int>> w = v["D"];
    for (int i = (0); i < (int)(w.size()); i++) {
      if (c_y_min < w[i].second) {
        cand_t.insert(w[i].second - c_y_min);
      }
      if (c_y_max < w[i].second) {
        cand_t.insert(w[i].second - c_y_max);
      }
    }
  }
  {
    vector<pair<int, int>> w = v["R"];
    for (int i = (0); i < (int)(w.size()); i++) {
      if (c_x_max > w[i].first) {
        cand_t.insert(c_x_max - w[i].first);
      }
      if (c_x_min > w[i].first) {
        cand_t.insert(c_x_min - w[i].first);
      }
    }
  }
  {
    vector<pair<int, int>> w = v["L"];
    for (int i = (0); i < (int)(w.size()); i++) {
      if (c_x_min < w[i].first) {
        cand_t.insert(w[i].first - c_x_min);
      }
      if (c_x_max < w[i].first) {
        cand_t.insert(w[i].first - c_x_max);
      }
    }
  }
  if (vv["D"].size() > 0 && vv["U"].size() > 0) {
    for (int i = (0); i < (int)(vv["D"].size()); i++) {
      for (int j = (0); j < (int)(vv["U"].size()); j++) {
        int yy = vv["D"][i] - vv["U"][j];
        if (yy > 0) {
          cand_t.insert(yy / 2.0);
        }
      }
    }
  }
  if (vv["L"].size() > 0 && vv["R"].size() > 0) {
    for (int i = (0); i < (int)(vv["L"].size()); i++) {
      for (int j = (0); j < (int)(vv["R"].size()); j++) {
        int xx = vv["L"][i] - vv["R"][j];
        if (xx > 0) {
          cand_t.insert(xx / 2.0);
        }
      }
    }
  }
  double ret = 1e100;
  for (__typeof((cand_t).begin()) it = (cand_t).begin(); it != (cand_t).end();
       ++it) {
    ret = min(ret, solve(*it, c_x_max, c_x_min, c_y_max, c_y_min, vv));
  }
  printf("%.12lf\n", ret);
  return 0;
}
