N = gets.to_i
INF = 1e8
xmx = [-INF]*4
ymx = [-INF]*4
xmn = [INF]*4
ymn = [INF]*4
N.times do |i|
    *xy, d = gets.split
    x, y = xy.map(&:to_f)
    d = "RLUD".index(d)
    xmx[d] = [xmx[d], x].max
    ymx[d] = [ymx[d], y].max
    xmn[d] = [xmn[d], x].min
    ymn[d] = [ymn[d], y].min
end

cand = []
[xmx, ymx, xmn, ymn].each do |arr|
    arr.each do |a|
        arr.each do |b|
            d = (a-b).abs
            cand.push(d)
            cand.push(d/2)
        end
    end
end

ans = 1e18
dx = [1, -1, 0, 0]
dy = [0, 0, 1, -1]
cand.each do |t|
    xmax = -INF
    ymax = -INF
    xmin = INF
    ymin = INF
    4.times do |k|
        xmax = [xmax, xmx[k] + t*dx[k]].max
        ymax = [ymax, ymx[k] + t*dy[k]].max
        xmin = [xmin, xmn[k] + t*dx[k]].min
        ymin = [ymin, ymn[k] + t*dy[k]].min
    end
    ans = [ans, (xmax-xmin)*(ymax-ymin)].min
end
puts ans