package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

var sc, wr = bufio.NewScanner(os.Stdin), bufio.NewWriter(os.Stdout)

func scanString() string   { sc.Scan(); return sc.Text() }
func scanRunes() []rune    { return []rune(scanString()) }
func scanInt() int         { a, _ := strconv.Atoi(scanString()); return a }
func scanInt64() int64     { a, _ := strconv.ParseInt(scanString(), 10, 64); return a }
func scanFloat64() float64 { a, _ := strconv.ParseFloat(scanString(), 64); return a }

func scanInts(n int) []int {
	res := make([]int, n)
	for i := 0; i < n; i++ {
		res[i] = scanInt()
	}
	return res
}

func debug(a ...interface{}) { fmt.Fprintln(os.Stderr, a...) }

func abs(a float64) float64 {
	if a < 0 {
		return -a
	}
	return a
}
func min(a, b float64) float64 {
	if a < b {
		return a
	}
	return b
}
func max(a, b float64) float64 {
	if a > b {
		return a
	}
	return b
}

//•*¨*•.¸¸♪main•*¨*•.¸¸♪(　-ω-)ノ　(　・ω・)
func main() {
	defer wr.Flush()
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 10000), 1001001)

	n := scanInt()

	xs := make([]float64, n)
	ys := make([]float64, n)
	d := make([]string, n)
	rlx := [3][]float64{}
	udy := [3][]float64{}
	for i := 0; i < n; i++ {
		xs[i] = scanFloat64()
		ys[i] = scanFloat64()
		d[i] = scanString()
		switch d[i] {
		case "R":
			rlx[0] = append(rlx[0], xs[i])
			udy[2] = append(udy[2], ys[i])
		case "L":
			rlx[1] = append(rlx[1], xs[i])
			udy[2] = append(udy[2], ys[i])
		case "U":
			udy[0] = append(udy[0], ys[i])
			rlx[2] = append(rlx[2], xs[i])
		case "D":
			udy[1] = append(udy[1], ys[i])
			rlx[2] = append(rlx[2], xs[i])
		}
	}

	for i := 0; i < 3; i++ {
		sort.Float64s(rlx[i])
		sort.Float64s(udy[i])
	}

	t := map[float64]bool{}
	t[0] = true

	if len(rlx[0]) != 0 && len(rlx[1]) != 0 {
		t[abs(rlx[0][0]-rlx[1][0])/2] = true
		t[abs(rlx[0][len(rlx[0])-1]-rlx[1][len(rlx[1])-1])/2] = true
	}
	if len(rlx[1]) != 0 && len(rlx[2]) != 0 {
		t[abs(rlx[1][0]-rlx[2][0])] = true
		t[abs(rlx[1][len(rlx[1])-1]-rlx[2][len(rlx[2])-1])] = true
	}
	if len(rlx[2]) != 0 && len(rlx[0]) != 0 {
		t[abs(rlx[2][0]-rlx[0][0])] = true
		t[abs(rlx[2][len(rlx[2])-1]-rlx[0][len(rlx[0])-1])] = true
	}

	if len(udy[0]) != 0 && len(udy[1]) != 0 {
		t[abs(udy[0][0]-udy[1][0])/2] = true
		t[abs(udy[0][len(udy[0])-1]-udy[1][len(udy[1])-1])/2] = true
	}
	if len(udy[1]) != 0 && len(udy[2]) != 0 {
		t[abs(udy[1][0]-udy[2][0])] = true
		t[abs(udy[1][len(udy[1])-1]-udy[2][len(udy[2])-1])] = true
	}
	if len(udy[2]) != 0 && len(udy[0]) != 0 {
		t[abs(udy[2][0]-udy[0][0])] = true
		t[abs(udy[2][len(udy[2])-1]-udy[0][len(udy[0])-1])] = true
	}

	debug(t)

	ans := float64(1<<60)

	for now := range t {
		xmin := float64(1<<60)
		ymin := float64(1<<60)
		xmax := -float64(1<<60)
		ymax := -float64(1<<60)
		for i := 0; i < n; i++ {
			var x,y float64
			switch d[i] {
			case "R":
				x = xs[i]+now
				y = ys[i]
			case "L":
				x = xs[i]-now
				y = ys[i]
			case "U":
				x = xs[i]
				y = ys[i]+now
			case "D":
				x = xs[i]
				y = ys[i]-now
			}
			xmin = min(xmin, x)
			xmax = max(xmax, x)
			ymin = min(ymin, y)
			ymax = max(ymax, y)
		}

		ans = min(ans, (xmax-xmin)*(ymax-ymin))
	}

	fmt.Fprintln(wr, ans)

}


Measured memory_bytes: 11392