// Slower C++ solution:
#include <bits/stdc++.h>

#include <math.h>

using namespace std;

#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector")

typedef long double ld;

typedef long long ll;



struct Point {

    ll x, y, x1 = 0, y1 = 0;

    

    Point() {}

    

    Point(ll _x, ll _y, char c) {

        x = _x;

        y = _y;

        if (c == 'U') {

            y1 = 1;

        } else if (c == 'D') {

            y1 = -1;

        } else if (c == 'R') {

            x1 = 1;

        } else {

            x1 = -1;

        }

    }

};



vector<Point> vc;



ld dist(ld t) {

    ld max_x = -1e9, max_y = -1e9, min_x = 1e9, min_y = 1e9;

    for (auto p : vc) {

        ld xx = p.x + p.x1 * t;

        ld yy = p.y + p.y1 * t;

        max_x = max(max_x, xx);

        max_y = max(max_y, yy);

        min_x = min(min_x, xx);

        min_y = min(min_y, yy);

    }

    return (max_x - min_x) * (max_y - min_y);

}



int main() {

#ifdef LOCAL

    freopen("in", "r", stdin);

    freopen("out", "w", stdout);

#endif

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);

    cout.precision(20);

    int n;

    cin >> n;

    for (int i = 0; i < n; ++i) {

        ll x, y;

        char c;

        cin >> x >> y >> c;

        vc.push_back(Point(x, y, c));

    }

    ld l = 0, r = 1e11;

    for (int i = 0; i < 700; ++i) {

        ld m1 = (r - l) / 3 + l;

        ld m2 = r - (r - l) / 3;

        ld a1 = dist(m1);

        ld a2 = dist(m2);

        if (a1 > a2) {

            l = m1;

        } else {

            r = m2;

        }

    }

    cout << fixed << min(dist(l), dist(r));

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 3.7680790407825535x):
#include <bits/stdc++.h>



using namespace std;



#ifdef DGC

#include "debug.h"

#else

#define debug(...) 9715

#endif

typedef long long ll;

typedef long double ld;

typedef complex<ll> point;

#define F first

#define S second







int main()

{

	#ifdef DGC

		freopen("a.in", "r", stdin);

		//freopen("a.out", "w", stdout);

	#endif



	ios_base::sync_with_stdio(0), cin.tie(0);



	int n;

	cin >> n;

	map<char, vector<pair<int, int>>> mp;

	char z;

	for (int i = 0, x, y; i < n; ++i)

	{

		cin >> x >> y >> z;

		mp[z].push_back({ x, y });

	}



	int mnx = 1e9, mxx = -1e9, mny = 1e9, mxy = -1e9;

	for (auto i : mp['L']) mny = min(mny, i.S), mxy = max(mxy, i.S);

	for (auto i : mp['R']) mny = min(mny, i.S), mxy = max(mxy, i.S);

	for (auto i : mp['U']) mnx = min(mnx, i.F), mxx = max(mxx, i.F);

	for (auto i : mp['D']) mnx = min(mnx, i.F), mxx = max(mxx, i.F);



	auto f1 = [&](ld md)

	{

		ld fmn = mnx, fmx = mxx;

		for (auto i : mp['L'])

		{

			fmn = min(fmn, i.F - md);

			fmx = max(fmx, i.F - md);

		}

		for (auto i : mp['R'])

		{

			fmn = min(fmn, i.F + md);

			fmx = max(fmx, i.F + md);

		}

		fmn = min(fmn, fmx);

		return fmx-fmn;

	};



	auto f2 = [&](ld md)

	{

		ld fmn = mny, fmx = mxy;

		for (auto i : mp['D'])

		{

			fmn = min(fmn, i.S - md);

			fmx = max(fmx, i.S - md);

		}

		for (auto i : mp['U'])

		{

			fmn = min(fmn, i.S + md);

			fmx = max(fmx, i.S + md);

		}

		fmn = min(fmn, fmx);

		return fmx-fmn;

	};



	ld l = 0, r = 1e9+5;

	for (int it = 200; it--; )

	{

		ld md1 = l + (r-l) / 3.0;

		ld md2 = r - (r-l) / 3.0;

		if (f1(md1) * f2(md1) < f1(md2) * f2(md2))

			r = md2;

		else

			l = md1;

	}



	cout << setprecision(20) << fixed << f1(l) * f2(l) << "\n";



	return 0;

}