# frozen_string_literal: true

N = gets.to_i
xyd = []
N.times do
  e = gets.chomp.split
  xyd.push [e[0].to_i, e[1].to_i, e[2]]
end

def xval(xyd, t)
  x = xyd[0]
  case xyd[2]
  when 'L'
    x -= t
  when 'R'
    x += t
  end
  x
end

def yval(xyd, t)
  y = xyd[1]
  case xyd[2]
  when 'D'
    y -= t
  when 'U'
    y += t
  end
  y
end

def val(xyd, t)
  min_x = max_x = xval(xyd[0], t)
  min_y = max_y = yval(xyd[0], t)
  1.upto(N - 1) do |i|
    x = xval(xyd[i], t)
    y = yval(xyd[i], t)
    min_x = x if min_x > x
    max_x = x if max_x < x
    min_y = y if min_y > y
    max_y = y if max_y < y
  end
  (max_x - min_x) * (max_y - min_y)
end

t = (0..1000000000).bsearch { |t| val(xyd, t + 1) - val(xyd, t) > 0 }
v1 = val(xyd, t)
v2 = val(xyd, t - 1)
if v1 == v2
  puts val(xyd, t - 0.5)
else
  puts [v1, v2].min
end
