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
  XMIN << Proc.new{|t| (U + D).min_by{|e| e[0]}[0]}
  XMAX << Proc.new{|t| (U + D).max_by{|e| e[0]}[0]}
end
if !((R + L).empty?) then
  YMIN << Proc.new{|t| (R + L).min_by{|e| e[1]}[1]}
  YMAX << Proc.new{|t| (R + L).max_by{|e| e[1]}[1]}
end

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

ans = 10 ** 18
t = 0.to_f
while(true) do
  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
  n = (xmax - xmin) * (ymax - ymin)
  break if n > ans
  ans = n
  t += 0.5
end

puts ans
