output_description: Print the minimum possible value of (x_{max} - x_{min}) \times (y_{max} -
  y_{min}).
  
  The output will be considered correct when its absolute or relative error from
  the judge's output is at most 10^{-9}.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
      x_1 y_1 d_1
      x_2 y_2 d_2
      .
      .
      .
      x_N y_N d_N
attempt: INF = 10**20
  
  import sys
  import numpy as np
  
  input = sys.stdin.readline
  
  N = int(input())
  direction = ["U", "D", "R", "L"]
  X = {moji: [] for moji in direction}
  Y = {moji: [] for moji in direction}
  for i in range(N):
      x, y, d = input().split()
      x = int(x)
      y = int(y)
      X[d].append(x)
      Y[d].append(y)
  
  query = []
  # Xmax
  if not X["L"]:
      Lmax = -INF
  else:
      Lmax = max(X["L"])
  if not X["R"]:
      Rmax = -INF
  else:
      Rmax = max(X["R"])
  if not X["U"]:
      mobUmax = -INF
  else:
      mobUmax = max(X["U"])
  if not X["D"]:
      mobDmax = -INF
  else:
      mobDmax = max(X["D"])
  UDmax = max(mobUmax, mobDmax)
  
  
  def Xmax(t):
      return max(UDmax, Rmax + t, Lmax - t)
  
  
  q1 = (Lmax - Rmax) / 2
  q2 = Lmax - UDmax
  q3 = UDmax - Rmax
  if q1 > q2:
      query.append([q2, "Xmax", 0, UDmax])
      query.append([q3, "Xmax", 1, Rmax])
  else:
      query.append([q1, "Xmax", 1, Rmax])
  
  # Xmin
  if not X["L"]:
      Lmin = INF
  else:
      Lmin = min(X["L"])
  if not X["R"]:
      Rmin = INF
  else:
      Rmin = min(X["R"])
  if not X["U"]:
      mobUmin = INF
  else:
      mobUmin = min(X["U"])
  if not X["D"]:
      mobDmin = INF
  else:
      mobDmin = min(X["D"])
  UDmin = min(mobUmin, mobDmin)
  
  
  def Xmin(t):
      return min(UDmin, Rmin + t, Lmin - t)
  
  
  q1 = (Lmin - Rmin) / 2
  q2 = UDmin - Rmin
  q3 = Lmin - UDmin
  if q1 > q2:
      query.append([q2, "Xmin", 0, UDmin])
      query.append([q3, "Xmin", -1, Lmin])
  else:
      query.append([q1, "Xmin", -1, Lmin])
  
  # Ymax
  if not Y["L"]:
      mobLmax = -INF
  else:
      mobLmax = max(Y["L"])
  if not Y["R"]:
      mobRmax = -INF
  else:
      mobRmax = max(Y["R"])
  if not Y["U"]:
      Umax = -INF
  else:
      Umax = max(Y["U"])
  if not Y["D"]:
      Dmax = -INF
  else:
      Dmax = max(Y["D"])
  LRmax = max(Lmax, Rmax)
  
  
  def Ymax(t):
      return max(LRmax, Umax + t, Dmax - t)
  
  
  q1 = (Dmax - Umax) / 2
  q2 = Dmax - LRmax
  q3 = LRmax - Umax
  if q1 > q2:
      query.append([q2, "Ymax", 0, LRmax])
      query.append([q3, "Ymax", 1, Umax])
  else:
      query.append([q1, "Ymax", 1, Umax])
  
  # Ymin
  if not Y["L"]:
      mobLmin = INF
  else:
      mobLmin = min(Y["L"])
  if not Y["R"]:
      mobRmin = INF
  else:
      mobRmin = min(Y["R"])
  if not Y["U"]:
      Umin = INF
  else:
      Umin = min(Y["U"])
  if not Y["D"]:
      Dmin = INF
  else:
      Dmin = min(Y["D"])
  LRmin = min(mobLmin, mobRmin)
  
  
  def Ymin(t):
      return min(LRmin, Umin + t, Dmin - t)
  
  
  q1 = (Dmin - Umin) / 2
  q2 = LRmin - Umin
  q3 = Dmin - LRmin
  if q1 > q2:
      query.append([q2, "Ymin", 0, UDmin])
      query.append([q3, "Ymin", -1, Dmin])
  else:
      query.append([q1, "Xmax", -1, Dmin])
  
  query.sort()
  xmax = np.poly1d([-1, Lmax])
  xmin = np.poly1d([1, Rmin])
  ymax = np.poly1d([-1, Dmax])
  ymin = np.poly1d([1, Umin])
  
  val = []
  for i in range(-1, len(query) - 1):
      if i == -1:
          p = (xmax - xmin) * (ymax - ymin)
          coef2d = p.coef[0]
          coef1d = p.coef[1]
          if coef2d > 0:
              minval = coef1d / (2 * coef2d)
              next = query[i + 1][0]
              if minval >= 0 and next > minval:
                  val.append(minval)
      else:
          t, func, c2d, c1d = query[i]
          if func == "Xmax":
              xmax = np.poly1d([c2d, c1d])
          if func == "Xmin":
              xmin = np.poly1d([c2d, c1d])
          if func == "Ymax":
              ymax = np.poly1d([c2d, c1d])
          if func == "Ymin":
              ymin = np.poly1d([c2d, c1d])
          p = (xmax - xmin) * (ymax - ymin)
          if p.order == 2:
              coef2d = p.coef[0]
              coef1d = p.coef[1]
              if coef2d > 0:
                  minval = coef1d / (2 * coef2d)
                  next = query[i + 1][0]
                  if minval >= 0 and next > minval:
                      val.append(minval)
  
  
  def function(t):
      return (Xmax(t) - Xmin(t)) * (Ymax(t) - Ymin(t))
  
  
  ans = float("inf")
  for i in range(0, len(val)):
      if 10**8 >= val[i]:
          ans = min(ans, function(val[i]))
  
  for i in range(0, len(query)):
      if 10**8 >= query[i][0] >= 0:
          ans = min(ans, function(query[i][0]))
  
  print(ans)
  
problem_description: Statement
  
  There are N points in a two-dimensional plane. The initial coordinates of the
  i-th point are (x_i, y_i). Now, each point starts moving at a speed of 1 per
  second, in a direction parallel to the x\- or y\- axis. You are given a
  character d_i that represents the specific direction in which the i-th point
  moves, as follows:
  
    * If d_i = `R`, the i-th point moves in the positive x direction;
    * If d_i = `L`, the i-th point moves in the negative x direction;
    * If d_i = `U`, the i-th point moves in the positive y direction;
    * If d_i = `D`, the i-th point moves in the negative y direction.
  
  You can stop all the points at some moment of your choice after they start
  moving (including the moment they start moving). Then, let x_{max} and x_{min}
  be the maximum and minimum among the x-coordinates of the N points,
  respectively. Similarly, let y_{max} and y_{min} be the maximum and minimum
  among the y-coordinates of the N points, respectively.
  
  Find the minimum possible value of (x_{max} - x_{min}) \times (y_{max} -
  y_{min}) and print it.
samples: [{"input": "2\n    0 3 D\n    3 0 L", "output": "0\n    \n\nAfter three seconds, the two points will meet at the origin. The value in\nquestion will be 0 at that moment.\n\n* * *"}, {"input": "5\n    -7 -10 U\n    7 -6 U\n    -8 7 D\n    -3 3 D\n    0 -6 R", "output": "97.5\n    \n\nThe answer may not be an integer.\n\n* * *"}, {"input": "20\n    6 -10 R\n    -4 -9 U\n    9 6 D\n    -3 -2 R\n    0 7 D\n    4 5 D\n    10 -10 U\n    -1 -8 U\n    10 -6 D\n    8 -5 U\n    6 4 D\n    0 3 D\n    7 9 R\n    9 -4 R\n    3 10 D\n    1 9 U\n    1 -6 U\n    9 -8 R\n    6 7 D\n    7 -3 D", "output": "273"}]