using CompLib.Util;
using System;

public class Program
{
    int N;
    const decimal Inf = 100000000000;
    decimal RYMin, RYMax, RXMin, RXMax;
    decimal LYMin, LYMax, LXMin, LXMax;
    decimal UYMin, UYMax, UXMin, UXMax;
    decimal DYMin, DYMax, DXMin, DXMax;

    public void Solve()
    {
        var sc = new Scanner();
        N = sc.NextInt();

        RYMin = LYMin = UYMin = DYMin = Inf * 10;
        RXMin = LXMin = UXMin = DXMin = Inf * 10;
        RYMax = LYMax = UYMax = DYMax = -Inf * 10;
        RXMax = LXMax = UXMax = DXMax = -Inf * 10;

        for (int i = 0; i < N; i++)
        {
            long x = sc.NextLong();
            long y = sc.NextLong();

            char d = sc.NextChar();

            switch (d)
            {
                case 'U':
                    UXMax = Math.Max(UXMax, x);
                    UYMax = Math.Max(UYMax, y);
                    UXMin = Math.Min(UXMin, x);
                    UYMin = Math.Min(UYMin, y);
                    break;
                case 'D':
                    DXMax = Math.Max(DXMax, x);
                    DYMax = Math.Max(DYMax, y);
                    DXMin = Math.Min(DXMin, x);
                    DYMin = Math.Min(DYMin, y);
                    break;
                case 'L':
                    LXMax = Math.Max(LXMax, x);
                    LYMax = Math.Max(LYMax, y);
                    LXMin = Math.Min(LXMin, x);
                    LYMin = Math.Min(LYMin, y);
                    break;
                case 'R':
                    RXMax = Math.Max(RXMax, x);
                    RYMax = Math.Max(RYMax, y);
                    RXMin = Math.Min(RXMin, x);
                    RYMin = Math.Min(RYMin, y);
                    break;
            }
        }
        decimal ans = S(0);

        // X,Yの最大、最小が切り替わるタイミングが候補
        {
            // RXMinがx最小じゃなくなるタイミング
            decimal udXMin = Math.Min(UXMin, DXMin);
            {
                decimal ng = 0;
                decimal ok = Inf;
                for (int i = 0; i < 500; i++)
                {
                    decimal med = (ok + ng) / 2;
                    if (RXMin + med < Math.Min(LXMin - med, udXMin))
                    {
                        ng = med;
                    }
                    else
                    {
                        ok = med;
                    }
                }
                ans = Math.Min(ans, S(ok));
            }
            // LMinがx最小になるタイミング
            {
                decimal ng2 = 0;
                decimal ok2 = Inf;
                for (int i = 0; i < 500; i++)
                {
                    decimal med = (ok2 + ng2) / 2;
                    if (LXMin - med <= Math.Min(RXMin + med, udXMin))
                    {
                        ok2 = med;
                    }
                    else
                    {
                        ng2 = med;
                    }
                }
                ans = Math.Min(ans, S(ok2));
            }
        }
        {
            // LXMaxがx最大じゃなくなるタイミング
            decimal udXMax = Math.Max(UXMax, DXMax);
            {
                decimal ng = 0;
                decimal ok = Inf;
                for (int i = 0; i < 500; i++)
                {
                    decimal med = (ok + ng) / 2;
                    if (LXMax - med > Math.Max(RXMax + med, udXMax))
                    {
                        ng = med;
                    }
                    else
                    {
                        ok = med;
                    }
                }
                ans = Math.Min(ans, S(ok));
            }
            // RMaxがx最大になるタイミング
            {
                decimal ng2 = 0;
                decimal ok2 = Inf;
                for (int i = 0; i < 500; i++)
                {
                    decimal med = (ok2 + ng2) / 2;
                    if (RXMax + med >= Math.Max(LXMax - med, udXMax))
                    {
                        ok2 = med;
                    }
                    else
                    {
                        ng2 = med;
                    }
                }
                ans = Math.Min(ans, S(ok2));
            }
        }
        {
            decimal lrYMin = Math.Min(LYMin, RYMin);
            // Y最小
            // UYminが最小じゃなくなる
            {
                decimal ok = Inf;
                decimal ng = 0;

                for (int i = 0; i < 500; i++)
                {
                    decimal med = (ok + ng) / 2;
                    if (UYMin + med < Math.Min(DYMin - med, lrYMin))
                    {
                        ng = med;
                    }
                    else
                    {
                        ok = med;
                    }
                }

                ans = Math.Min(ans, S(ok));
            }

            // DYminが最小になる
            {
                decimal ok2 = Inf;
                decimal ng2 = 0;
                for (int i = 0; i < 500; i++)
                {
                    decimal med = (ok2 + ng2) / 2;
                    if (DYMin - med <= Math.Min(UYMin + med, lrYMin))
                    {
                        ok2 = med;
                    }
                    else
                    {
                        ng2 = med;
                    }
                }
                ans = Math.Min(ans, S(ok2));
            }
        }
        {
            // y最大
            decimal lrYMax = Math.Max(LYMax, RYMax);

            // DYMaxがy最大じゃなくなる
            {
                decimal ok = Inf;
                decimal ng = 0;
                for (int i = 0; i < 500; i++)
                {
                    decimal med = (ok + ng) / 2;
                    if (DYMax - med < Math.Max(UYMax + med, lrYMax))
                    {
                        ok = med;
                    }
                    else
                    {
                        ng = med;
                    }
                }
                ans = Math.Min(ans, S(ok));
            }

            // UYMaxがy最大になる
            {
                decimal ok2 = Inf;
                decimal ng2 = 0;

                for (int i = 0; i < 500; i++)
                {
                    decimal med = (ok2 + ng2) / 2;
                    if (UYMax + med >= Math.Max(DYMax - med, lrYMax))
                    {
                        ok2 = med;
                    }
                    else
                    {
                        ng2 = med;
                    }
                }
                ans = Math.Min(ans, S(ok2));
            }
        }
        Console.WriteLine("{0:f15}", ans);
    }

    decimal S(decimal time)
    {
        decimal xMax = Math.Max(UXMax, DXMax);
        decimal xMin = Math.Min(UXMin, DXMin);
        if (RXMin != Inf * 10)
        {
            xMax = Math.Max(xMax, RXMax + time);
            xMin = Math.Min(xMin, RXMin + time);
        }
        if (LXMin != Inf * 10)
        {
            xMax = Math.Max(xMax, LXMax - time);
            xMin = Math.Min(xMin, LXMin - time);
        }

        decimal yMax = Math.Max(LYMax, RYMax);
        decimal yMin = Math.Min(LYMin, RYMin);
        if (UYMin != Inf * 10)
        {
            yMax = Math.Max(yMax, UYMax + time);
            yMin = Math.Min(yMin, UYMin + time);
        }

        if (DYMin != Inf * 10)
        {
            yMax = Math.Max(yMax, DYMax - time);
            yMin = Math.Min(yMin, DYMin - time);
        }

        // Console.WriteLine($"{time} { (xMax - xMin) * (yMax - yMin)}");
        return (xMax - xMin) * (yMax - yMin);
    }

    public static void Main(string[] args) => new Program().Solve();
}

namespace CompLib.Util
{
    using System;
    using System.Linq;
    class Scanner
    {
        private int _index;
        private string[] _line;
        const char separator = ' ';

        public Scanner()
        {
            _index = 0;
            _line = new string[0];
        }

        public string Next()
        {
            while (_index >= _line.Length)
            {
                _line = Console.ReadLine().Split(separator);
                _index = 0;
            }
            return _line[_index++];
        }
        public int NextInt() => int.Parse(Next());
        public long NextLong() => long.Parse(Next());
        public double NextDouble() => double.Parse(Next());
        public char NextChar() => Next()[0];
        public char[] NextCharArray() => Next().ToCharArray();

        public string[] Array()
        {
            _line = Console.ReadLine().Split(separator);
            _index = _line.Length;
            return _line;
        }
        public int[] IntArray() => Array().Select(int.Parse).ToArray();
        public long[] LongArray() => Array().Select(long.Parse).ToArray();
        public double[] DoubleArray() => Array().Select(double.Parse).ToArray();
    }
}

Measured memory_bytes: 18232