N = gets.to_i
R = []
L = []
U = []
D = []
N.times{
  sx, sy, d = gets.chomp.split(" ")
  x = sx.to_i
  y = sy.to_i
  case d
  when 'R' then
    R << [x, y]
  when 'L' then
    L << [x, y]
  when 'U' then
    U << [x, y]
  else
    D << [x, y]
  end
}

XMIN = []
XMAX = []
YMIN = []
YMAX = []
if !((U + D).empty?) then
  w1 = (U + D).min_by{|e| e[0]}[0]
  XMIN << Proc.new{|t| w1}
  w2 = (U + D).max_by{|e| e[0]}[0]
  XMAX << Proc.new{|t| w2}
end
if !((R + L).empty?) then
  w3 = (R + L).min_by{|e| e[1]}[1]
  YMIN << Proc.new{|t| w3}
  w4 = (R + L).max_by{|e| e[1]}[1]
  YMAX << Proc.new{|t| w4}
end

if !(R.empty?) then
  w5 = R.min_by{|e| e[0]}[0]
  XMIN << Proc.new{|t| w5 + t}
  w6 = R.max_by{|e| e[0]}[0]
  XMAX << Proc.new{|t| w6 + t}
end
if !(L.empty?) then
  w7 = L.min_by{|e| e[0]}[0]
  XMIN << Proc.new{|t| w7 - t}
  w8 = L.max_by{|e| e[0]}[0]
  XMAX << Proc.new{|t| w8 - t}
end
if !(U.empty?) then
  w9 = U.min_by{|e| e[1]}[1]
  YMIN << Proc.new{|t| w9 + t}
  wa = U.max_by{|e| e[1]}[1]
  YMAX << Proc.new{|t| wa + t}
end
if !(D.empty?) then
  wb = D.min_by{|e| e[1]}[1]
  YMIN << Proc.new{|t| wb - t}
  wc = D.max_by{|e| e[1]}[1]
  YMAX << Proc.new{|t| wc - t}
end

def calc(t)
  xmin = XMIN.map{|e| e.call(t)}.min
  xmax = XMAX.map{|e| e.call(t)}.max
  ymin = YMIN.map{|e| e.call(t)}.min
  ymax = YMAX.map{|e| e.call(t)}.max
  (xmax - xmin) * (ymax - ymin)
end

ans = 10 ** 18
wk = 10 ** 18
t = 0
l1, l2 = [0, 0]
while(true) do
  n = calc(t)
  break if n > wk
  wk = n
  t += 100000
  l2 = l1
  l1 = t
end

t = l2
while(true) do
  n = calc(t)
  break if n > ans
  ans = n
  t += 0.5
end

puts ans
