### BUGGY CODE ###

import sys
input=sys.stdin.readline

def TernarySearch(f,xmin,xmax):
    x0=xmin
    x3=xmax
    while x3-x0>10**(-10):
        x1=(x0*2+x3)/3
        x2=(x0+x3*2)/3
        if f(x1)<f(x2):
            x3=x2
        else:
            x0=x1
    return x3

n=int(input())
Rx,Ry,Lx,Ly,Ux,Uy,Dx,Dy=[],[],[],[],[],[],[],[]
for _ in range(n):
    x,y,d=input().split()
    x=int(x); y=int(y)
    if d=='R':
        Rx.append(x); Ry.append(y)
    elif d=='L':
        Lx.append(x); Ly.append(y)
    elif d=='U':
        Ux.append(x); Uy.append(y)
    else:
        Dx.append(x); Dy.append(y)

inf=10**11
max_x_plus=max(Rx+[-inf])
max_x_minus=max(Lx+[-inf])
max_x_stay=max(Ux+Dx+[-inf])
min_x_plus=min(Rx+[inf])
min_x_minus=min(Lx+[inf])
min_x_stay=min(Ux+Dx+[inf])
max_y_plus=max(Uy+[-inf])
max_y_minus=max(Dy+[-inf])
max_y_stay=max(Ry+Ly+[-inf])
min_y_plus=min(Uy+[inf])
min_y_minus=min(Dy+[inf])
min_y_stay=min(Ry+Ly+[inf])

def S(t):
    max_x=max(max_x_plus+t,max_x_minus-t,max_x_stay)
    min_x=min(min_x_plus+t,min_x_minus-t,min_x_stay)
    max_y=max(max_y_plus+t,max_y_minus-t,max_y_stay)
    min_y=min(min_y_plus+t,min_y_minus-t,min_y_stay)
    return (max_x-min_x)*(max_y-min_y)

l=0; h=10**10
print(S(TernarySearch(S,l,h)))

### FIXED CODE ###

import sys
input=sys.stdin.readline
from itertools import product
n=int(input())
Rx,Ry,Lx,Ly,Ux,Uy,Dx,Dy=[],[],[],[],[],[],[],[]
for _ in range(n):
    x,y,d=input().split()
    x=int(x); y=int(y)
    if d=='R':
        Rx.append(x); Ry.append(y)
    elif d=='L':
        Lx.append(x); Ly.append(y)
    elif d=='U':
        Ux.append(x); Uy.append(y)
    else:
        Dx.append(x); Dy.append(y)
inf=float('inf')
stay_x=[min(Ux+Dx+[inf]),max(Ux+Dx+[-inf])]
plus_x=[min(Rx+[inf]),max(Rx+[-inf])]
minus_x=[min(Lx+[inf]),max(Lx+[-inf])]
plus_y=[min(Uy+[inf]),max(Uy+[-inf])]
minus_y=[min(Dy+[inf]),max(Dy+[-inf])]
stay_y=[min(Ly+Ry+[inf]),max(Ly+Ry+[-inf])]

T=[0]
for x1,x2 in product(minus_x,plus_x):
    if x1 in (-inf,inf) or x2 in (-inf,inf):
        continue
    t=(x1-x2)/2
    if t>0:
        T.append(t)
for x1,x2 in product(minus_x,stay_x):
    if x1 in (-inf,inf) or x2 in (-inf,inf):
        continue
    t=x1-x2
    if t>0:
        T.append(t)
for x1,x2 in product(plus_x,stay_x):
    if x1 in (-inf,inf) or x2 in (-inf,inf):
        continue
    t=x2-x1
    if t>0:
        T.append(t)
for y1,y2 in product(minus_y,plus_y):
    if y1 in (-inf,inf) or y2 in (-inf,inf):
        continue
    t=(y1-y2)/2
    if t>0:
        T.append(t)
for y1,y2 in product(minus_y,stay_y):
    if y1 in (-inf,inf) or y2 in (-inf,inf):
        continue
    t=y1-y2
    if t>0:
        T.append(t)
for y1,y2 in product(plus_y,stay_y):
    if y1 in (-inf,inf) or y2 in (-inf,inf):
        continue
    t=y2-y1
    if t>0:
        T.append(t)
T=sorted(set(T))
T.append(10**10)

def width(t):
    left=min(stay_x[0],plus_x[0]+t,minus_x[0]-t)
    right=max(stay_x[1],plus_x[1]+t,minus_x[1]-t)
    return right-left
def height(t):
    down=min(stay_y[0],plus_y[0]+t,minus_y[0]-t)
    up=max(stay_y[1],plus_y[1]+t,minus_y[1]-t)
    return up-down

def minS(x1,x2,y1,y2):
    ax,bx=x2-x1,x1; ay,by=y2-y1,y1
    a,b,c=ax*ay,ax*by+bx*ay,bx*by
    if a<=0:
        return min(x1*y1,x2*y2)
    m=-b/(2*a)
    if m<0 or m>1:
        return min(x1*y1,x2*y2)
    return a*m**2+b*m+c

l=len(T)
X=[width(t) for t in T]
Y=[height(t) for t in T]
ans=inf
for i in range(l-1):
    x1,x2=X[i],X[i+1]
    y1,y2=Y[i],Y[i+1]
    ans=min(ans,minS(x1,x2,y1,y2))
print(ans)