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

t_can = []
t_can << (w1 - w5).abs if !w1.nil? && !w5.nil?
t_can << (w1 - w7).abs if !w1.nil? && !w7.nil?
t_can << (w2 - w6).abs if !w2.nil? && !w6.nil?
t_can << (w2 - w8).abs if !w2.nil? && !w8.nil?
t_can << (w3 - w9).abs if !w3.nil? && !w9.nil?
t_can << (w3 - wb).abs if !w3.nil? && !wb.nil?
t_can << (w4 - wa).abs if !w4.nil? && !wa.nil?
t_can << (w4 - wc).abs if !w4.nil? && !wc.nil?
t_can << (w5 - w7).abs / 2.0 if !w5.nil? && !w7.nil?
t_can << (w6 - w8).abs / 2.0 if !w6.nil? && !w8.nil?
t_can << (w9 - wb).abs / 2.0 if !w9.nil? && !wb.nil?
t_can << (wa - wc).abs / 2.0 if !wa.nil? && !wc.nil?

ans = calc(0)
t_can.each{|t|
  n = calc(t)
  ans = n if n < ans
}

puts ans
