import scala.annotation.tailrec
import scala.collection.mutable
import scala.io.StdIn._
object Main extends App {
  val MAX = 200000000.0
  val MIN = -MAX
  val n = readInt()
  val coordinates = mutable.Map[Char, List[Coordinate]]().withDefaultValue(Nil)
  for (_ ← 0 until n) {
    val Array(x, y, d) = readLine.trim.split(' ')
    coordinates(d.head) ::= Coordinate(x.toDouble, y.toDouble)
  }
  val constMinX = List('U', 'D').flatMap(coordinates).minByOption(_.x).map(_.x).getOrElse(MAX)
  val constMaxX = List('U', 'D').flatMap(coordinates).maxByOption(_.x).map(_.x).getOrElse(MIN)
  val constMinY = List('L', 'R').flatMap(coordinates).minByOption(_.y).map(_.y).getOrElse(MAX)
  val constMaxY = List('L', 'R').flatMap(coordinates).maxByOption(_.y).map(_.y).getOrElse(MIN)
  val minUp = coordinates('U').minByOption(_.y).map(_.y).getOrElse(MAX)
  val maxUp = coordinates('U').maxByOption(_.y).map(_.y).getOrElse(MIN)
  val minDown = coordinates('D').minByOption(_.y).map(_.y).getOrElse(MAX)
  val maxDown = coordinates('D').maxByOption(_.y).map(_.y).getOrElse(MIN)
  val minRight = coordinates('R').minByOption(_.x).map(_.x).getOrElse(MAX)
  val maxRight = coordinates('R').maxByOption(_.x).map(_.x).getOrElse(MIN)
  val minLeft = coordinates('L').minByOption(_.x).map(_.x).getOrElse(MAX)
  val maxLeft = coordinates('L').maxByOption(_.x).map(_.x).getOrElse(MIN)

  val changeTime = List(0, constMinY - minUp, minDown - constMinY, constMinX - minRight, minLeft - constMinX, constMaxY - maxUp, maxDown - constMaxY, constMaxX - maxRight, maxLeft - constMaxX, (minDown - minUp) / 2, (maxDown - maxUp) / 2, (minLeft - minRight) / 2, (maxLeft - maxRight) / 2).filter(_ >= 0)

  println(
    "%.15f".format(changeTime.map{t ⇒
      val minX = List(constMinX, minRight + t, minLeft - t).min
      val maxX = List(constMaxX, maxRight + t, maxLeft - t).max
      val minY = List(constMinY, minUp + t, minDown - t).min
      val maxY = List(constMaxY, maxUp + t, maxDown - t).max
      (maxX - minX) * (maxY - minY)
    }.min)
  )

  implicit class Scope[T](val receiver: T) extends AnyVal {
    def let[A](@inline func: T ⇒ A): A = func(receiver)
    def tap(@inline func: T ⇒ Unit): T = {
      func(receiver)
      receiver
    }
  }
}
case class Coordinate(x: Double, y: Double)