xmax = maximum . (-100000000000000000 :) . map (!! 0)
xmin = minimum . (100000000000000000 :) . map (!! 0)
ymax = maximum . (-100000000000000000 :) . map (!! 1)
ymin = minimum . (100000000000000000 :) . map (!! 1)
calc p = (xmax p - xmin p) * (ymax p - ymin p)
calc_t xs = [fromIntegral (fst (xs !! i) - fst(xs !! j)) / fromIntegral (snd (xs !! i) - snd (xs !! j))
  | i <- [0 .. length xs - 1], j <- [0 .. length xs - 1],
    snd (xs !! i) /= snd (xs !! j)]
up t [x, y] = [x, y + t]
down t [x, y] = [x, y - t]
left t [x, y] = [x - t, y]
right t [x, y] = [x + t, y]
addt u d l r t = map (up t) u ++ map (down t) d ++ map (left t) l ++ map (right t) r

main = do
  getLine
  p <- map (map read . words) . lines <$> getContents
  let u = filter (\i -> i !! 2 == 'U') p
  let d = filter (\i -> i !! 2 == 'D') p
  let l = filter (\i -> i !! 2 == 'L') p
  let r = filter (\i -> i !! 2 == 'R') p
  let udxmax = (xmax (u ++ d), 0)
  let udxmin = (xmin (u ++ d), 0)
  let lrymax = (ymax (l ++ r), 0)
  let lrymin = (ymin (l ++ r), 0)
  let lxmax = (xmax l, -1)
  let lxmin = (xmin l, -1)
  let rxmax = (xmax r, 1)
  let rxmin = (xmin r, 1)
  let uymax = (ymax u, 1)
  let uymin = (ymin u, 1)
  let dymax = (ymax d, -1)
  let dymin = (ymin d, -1)
  let xs = [udxmax, lxmax, rxmax, udxmin, lxmin, rxmin]
  let ys = [lrymax, uymax, dymax, lrymin, uymin, dymin]
  let ts = filter (>= 0) $ 0 : calc_t xs ++ calc_t ys
  let p_t = map (addt u d l r) ts
  print $ minimum $ calc p_t