//#define NDEBUG
#include <cstddef>
#include <cstdint>
#include <vector>

namespace n91 {

using i8 = std::int_fast8_t;
using i32 = std::int_fast32_t;
using i64 = std::int_fast64_t;
using u8 = std::uint_fast8_t;
using u32 = std::uint_fast32_t;
using u64 = std::uint_fast64_t;
using isize = std::ptrdiff_t;
using usize = std::size_t;

constexpr usize operator"" _z(unsigned long long x) noexcept {
  return static_cast<usize>(x);
}

class rep {
  const usize f, l;

public:
  class itr {
    friend rep;
    usize i;
    constexpr itr(const usize x) noexcept : i(x) {}

  public:
    void operator++() noexcept { ++i; }
    constexpr usize operator*() const noexcept { return i; }
    constexpr bool operator!=(const itr x) const noexcept { return i != x.i; }
  };
  constexpr rep(const usize first, const usize last) noexcept
      : f(first), l(last) {}
  constexpr itr begin() const noexcept { return itr(f); }
  constexpr itr end() const noexcept { return itr(l); }
};
class revrep {
  const usize f, l;

public:
  class itr {
    friend revrep;
    usize i;
    constexpr itr(usize x) noexcept : i(x) {}

  public:
    void operator++() noexcept { --i; }
    constexpr usize operator*() const noexcept { return i; }
    constexpr bool operator!=(const itr x) const noexcept { return i != x.i; }
  };
  constexpr revrep(usize first, usize last) noexcept : f(--first), l(--last) {}
  constexpr itr begin() const noexcept { return itr(l); }
  constexpr itr end() const noexcept { return itr(f); }
};
template <class T> using vec_alias = std::vector<T>;
template <class T> auto md_vec(const usize n, const T &value) {
  return std::vector<T>(n, value);
}
template <class... Args> auto md_vec(const usize n, Args... args) {
  return std::vector<decltype(md_vec(args...))>(n, md_vec(args...));
}
template <class T> constexpr T difference(const T &a, const T &b) {
  return a < b ? b - a : a - b;
}

} // namespace n91

#include <cstdint>

namespace n91 {

constexpr std::uint_fast64_t totient(std::uint_fast64_t x) noexcept {
  using u64 = std::uint_fast64_t;
  u64 ret = x;
  for (u64 i = static_cast<u64>(2); i * i <= x; ++i) {
    if (x % i == static_cast<u64>(0)) {
      ret -= ret / i;
      x /= i;
      while (x % i == static_cast<u64>(0)) {
        x /= i;
      }
    }
  }
  if (x != static_cast<u64>(1)) {
    ret -= ret / x;
  }
  return ret;
}

template <std::uint_fast64_t Modulus,
          std::uint_fast64_t InverseExp =
              totient(Modulus) - static_cast<u64>(1)>
class modint {
  using u64 = std::uint_fast64_t;

  static_assert(Modulus < static_cast<u64>(1) << static_cast<u64>(32),
                "Modulus must be less than 2**32");

  u64 a;

  constexpr modint &negate() noexcept {
    if (a != static_cast<u64>(0)) {
      a = Modulus - a;
    }
    return *this;
  }

public:
  constexpr modint(const u64 x = static_cast<u64>(0)) noexcept
      : a(x % Modulus) {}
  constexpr u64 &value() noexcept { return a; }
  constexpr u64 value() const noexcept { return a; }
  constexpr modint operator+() const noexcept { return modint(*this); }
  constexpr modint operator-() const noexcept { return modint(*this).negate(); }
  constexpr modint operator+(const modint rhs) const noexcept {
    return modint(*this) += rhs;
  }
  constexpr modint operator-(const modint rhs) const noexcept {
    return modint(*this) -= rhs;
  }
  constexpr modint operator*(const modint rhs) const noexcept {
    return modint(*this) *= rhs;
  }
  constexpr modint operator/(const modint rhs) const noexcept {
    return modint(*this) /= rhs;
  }
  constexpr modint &operator+=(const modint rhs) noexcept {
    a += rhs.a;
    if (a >= Modulus) {
      a -= Modulus;
    }
    return *this;
  }
  constexpr modint &operator-=(const modint rhs) noexcept {
    if (a < rhs.a) {
      a += Modulus;
    }
    a -= rhs.a;
    return *this;
  }
  constexpr modint &operator*=(const modint rhs) noexcept {
    a = a * rhs.a % Modulus;
    return *this;
  }
  constexpr modint &operator/=(modint rhs) noexcept {
    u64 exp = InverseExp;
    while (exp) {
      if (exp % static_cast<u64>(2) != static_cast<u64>(0)) {
        *this *= rhs;
      }
      rhs *= rhs;
      exp /= static_cast<u64>(2);
    }
    return *this;
  }
  constexpr bool operator==(const modint rhs) const noexcept {
    return a == rhs.a;
  }
  constexpr bool operator!=(const modint rhs) const noexcept {
    return a != rhs.a;
  }
};

} // namespace n91

#include <algorithm>
#include <functional>
#include <iostream>
#include <set>
#include <utility>

namespace n91 {

void main_() {
  usize n;
  std::cin >> n;
  struct point {
    double x, y;
    char d;
    constexpr double get_x(const double t) const noexcept {
      switch (d) {
      case 'R': {
        return x + t;
      }
      case 'L': {
        return x - t;
      }
      default: { return x; }
      }
    }
    constexpr double get_y(const double t) const noexcept {
      switch (d) {
      case 'U': {
        return y + t;
      }
      case 'D': {
        return y - t;
      }
      default: { return y; }
      }
    }
  };

  std::vector<point> ps(n);
  for (auto &e : ps) {
    std::cin >> e.x >> e.y >> e.d;
  }

  const auto get_r = [&](const double t) {
    double ret = std::numeric_limits<double>::lowest();
    for (const auto &e : ps) {
      ret = std::max(ret, e.get_x(t));
    }
    return ret;
  };
  const auto get_l = [&](const double t) {
    double ret = std::numeric_limits<double>::max();
    for (const auto &e : ps) {
      ret = std::min(ret, e.get_x(t));
    }
    return ret;
  };
  const auto get_u = [&](const double t) {
    double ret = std::numeric_limits<double>::lowest();
    for (const auto &e : ps) {
      ret = std::max(ret, e.get_y(t));
    }
    return ret;
  };
  const auto get_d = [&](const double t) {
    double ret = std::numeric_limits<double>::max();
    for (const auto &e : ps) {
      ret = std::min(ret, e.get_y(t));
    }
    return ret;
  };

  const auto score = [&](const double t) {
    return (get_r(t) - get_l(t)) * (get_u(t) - get_d(t));
  };

  constexpr double tmin = static_cast<double>(0);
  constexpr double tmax = static_cast<double>(200000000);

  std::set<double> ts({tmin, tmax});

  const auto addt = [&](const auto &g, const auto &c) {
    double f = tmin, l = tmax;
    for (const auto loop : rep(0_z, 100_z)) {
      const double left = (f + f + l) / static_cast<double>(3);
      const double right = (f + l + l) / static_cast<double>(3);
      if (c(g(left), g(right))) {
        f = left;
      } else {
        l = right;
      }
    }
    ts.emplace(f);
  };

  addt(get_r, std::greater<double>());
  addt(get_r, std::greater_equal<double>());
  addt(get_l, std::less<double>());
  addt(get_l, std::less_equal<double>());
  addt(get_u, std::greater<double>());
  addt(get_u, std::greater_equal<double>());
  addt(get_d, std::less<double>());
  addt(get_d, std::less_equal<double>());

  const std::vector<double> tsv(ts.cbegin(), ts.cend());

  double ans = std::numeric_limits<double>::max();

  for (const auto i : rep(1_z, tsv.size())) {
    double tf = static_cast<double>(tsv[i - 1_z]);
    double tl = static_cast<double>(tsv[i]);

    for (const auto loop : rep(0_z, 100_z)) {
      const double left = (tf + tf + tl) / static_cast<double>(3);
      const double right = (tf + tl + tl) / static_cast<double>(3);

      if (score(left) > score(right)) {
        tf = left;
      } else {
        tl = right;
      }
    }

    ans = std::min(ans, score(tf));
  }

  printf("%10.10lf", ans);
}

} // namespace n91

int main() {
  n91::main_();
  return 0;
}


Measured memory_bytes: 2688