#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#include <iostream>
#include <random>
#include<map>
#include <iomanip>
#include <time.h>
#include <stdlib.h>
#include <list>
#include <typeinfo>
#include <list>
#include <set>
#include <cassert>
#include<fstream>
#include <unordered_map>
#include <cstdlib>
#include <complex>
using namespace std;
#define Ma_PI 3.141592653589793
#define eps 0.00000001
#define LONG_INF 30000000000LL
#define GOLD 1.61803398874989484820458
#define MAX_MOD 1000000007
#define MOD 998244353
#define REP(i,n) for(long long i = 0;i < n;++i)    
#define seg_size 524288
double dot(complex<double> a, complex<double> b) {
	return a.real() * b.real() + a.imag() * b.imag();
}
double gyaku_dot(complex<double> a, complex<double> b) {
	return a.real() * b.imag() - a.imag() * b.real();
}
double leng(complex<double> a) {
	return sqrt(a.real() * a.real() + a.imag() * a.imag());
}
double angles(complex<double> a, complex<double> b) {
	double cosine = dot(a, b) / (leng(a) * leng(b));
	double sine = gyaku_dot(a, b) / (leng(a) * leng(b));
	double kaku = acos(cosine);
	if (sine <= 0) {
		kaku = 2 * Ma_PI - kaku;
	}
	return kaku;
}
vector<int> convex_hull(vector<complex<double>> a) {
	vector<int> ans;
	double now_minnest = a[0].real();
	int now_itr = 0;
	REP(i, a.size()) {
		if (now_minnest > a[i].real()) {
			now_minnest = a[i].real();
			now_itr = i;
		}
	}
	ans.push_back(now_itr);
	complex<double> ba(0, 1);
	while (true) {
		int now_go = 0;
		double now_min = 0;
		int starter = ans[ans.size() - 1];
		for (int i = 0; i < a.size(); ++i) {
			if (i != starter) {
				double goa = angles(ba, a[i] - a[starter]);
				if (goa > now_min) {
					now_min = goa;
					now_go = i;
				}
			}
		}
		if (now_go == ans[0]) break;
		ans.push_back(now_go);
		ba = complex<double>(a[now_go] - a[starter]);
	}
	return ans;
}
long long gcd(long long a, long long b) {
	if (b == 0) return a;
	return gcd(b, a % b);
}
#define int long long
vector<tuple<int, int, int>> inputs;
int xe[4] = { 1,-1,0,0 };
int ye[4] = { 0,0,1,-1 };
pair<int, int> calc_x(int times) {
	int maximum = -LONG_INF;
	int minimum = LONG_INF;
	REP(i, inputs.size()) {
		long long now_x = get<0>(inputs[i]) + times * xe[get<2>(inputs[i])];
		maximum = max(maximum, now_x);
		minimum = min(minimum, now_x);
	}
	return make_pair(minimum, maximum);
}
pair<int, int> calc_y(int times) {
	int maximum = -LONG_INF;
	int minimum = LONG_INF;
	REP(i, inputs.size()) {
		long long now_y = get<1>(inputs[i]) + times * ye[get<2>(inputs[i])];
		maximum = max(maximum, now_y);
		minimum = min(minimum, now_y);
	}
	return make_pair(minimum, maximum);
}
#undef int
int main() {
	iostream::sync_with_stdio(false);
#define int long long
	int n;
	cin >> n;
	REP(i, n) {
		int a, b;
		string c;
		cin >> a >> b >> c;
		a *= 2;
		b *= 2;
		if (c == "R") {
			inputs.push_back(make_tuple(a, b, 0));
		}
		else if (c == "L") {
			inputs.push_back(make_tuple(a, b, 1));
		}
		else if (c == "U") {
			inputs.push_back(make_tuple(a, b, 2));
		}
		else {
			inputs.push_back(make_tuple(a, b, 3));
		}
	}
	vector<int> timing;
	/*
	{
		int bot = 0;
		int top = 1e10;
		while (top - bot > 1) {
			int mid = (top + bot) / 2;
			pair<int, int> now = calc_x(mid);
			pair<int, int> next = calc_x(mid + 1);
			if (next.first - now.first <= -1) {
				bot = mid;
			}
			else {
				top = mid;
			}
		}
		if(top != 1e10)
		timing.push_back(bot);
	}
	{
		int bot = 0;
		int top = 1e10;
		while (top - bot > 1) {
			int mid = (top + bot) / 2;
			pair<int, int> now = calc_x(mid);
			pair<int, int> next = calc_x(mid + 1);
			if (next.first - now.first <= 0) {
				bot = mid;
			}
			else {
				top = mid;
			}
		}
		if (top != 1e10)
		timing.push_back(bot);
	}

	{
		int bot = 0;
		int top = 1e10;
		while (top - bot > 1) {
			int mid = (top + bot) / 2;
			pair<int, int> now = calc_x(mid);
			pair<int, int> next = calc_x(mid + 1);
			if (next.second - now.second >= 1) {
				bot = mid;
			}
			else {
				top = mid;
			}
		}
		if (top != 1e10)
		timing.push_back(bot);
	}
	{
		int bot = 0;
		int top = 1e10;
		while (top - bot > 1) {
			int mid = (top + bot) / 2;
			pair<int, int> now = calc_x(mid);
			pair<int, int> next = calc_x(mid + 1);
			if (next.second - now.second >= 0) {
				bot = mid;
			}
			else {
				top = mid;
			}
		}
		if (top != 1e10)
		timing.push_back(bot);
	}

	{
		int bot = 0;
		int top = 1e10;
		while (top - bot > 1) {
			int mid = (top + bot) / 2;
			pair<int, int> now = calc_y(mid);
			pair<int, int> next = calc_y(mid + 1);
			if (next.first - now.first <= -1) {
				bot = mid;
			}
			else {
				top = mid;
			}
		}
		if (top != 1e10)
		timing.push_back(bot);
	}
	{
		int bot = 0;
		int top = 1e10;
		while (top - bot > 1) {
			int mid = (top + bot) / 2;
			pair<int, int> now = calc_y(mid);
			pair<int, int> next = calc_y(mid + 1);
			if (next.first - now.first <= 0) {
				bot = mid;
			}
			else {
				top = mid;
			}
		}
		if (top != 1e10)
		timing.push_back(bot);
	}

	{
		int bot = 0;
		int top = 1e10;
		while (top - bot > 1) {
			int mid = (top + bot) / 2;
			pair<int, int> now = calc_y(mid);
			pair<int, int> next = calc_y(mid + 1);
			if (next.second - now.second >= 1) {
				bot = mid;
			}
			else {
				top = mid;
			}
		}
		if (top != 1e10)
		timing.push_back(bot);
	}
	{
		int bot = 0;
		int top = 1e10;
		while (top - bot > 1) {
			int mid = (top + bot) / 2;
			pair<int, int> now = calc_y(mid);
			pair<int, int> next = calc_y(mid + 1);
			if (next.second - now.second >= 0) {
				bot = mid;
			}
			else {
				top = mid;
			}
		}
		if (top != 1e10)
		timing.push_back(bot);
	}
	*/
	for (int border = 2; border >= -2;border--) {
		int bot = 0;
		int top = 1e10;
		while (top - bot > 1) {
			int mid = (top + bot) / 2;
			pair<int, int> now = calc_y(mid);
			pair<int, int> next = calc_y(mid + 1);
			int a = now.second - now.first;
			int b = next.second - next.first;
			if (a-b >= border) {
				bot = mid;
			}
			else {
				top = mid;
			}
		}
		if (top != 1e10)
			timing.push_back(bot);
	}
	for (int border = 2; border >= -2; border--) {
		int bot = 0;
		int top = 1e10;
		while (top - bot > 1) {
			int mid = (top + bot) / 2;
			pair<int, int> now = calc_x(mid);
			pair<int, int> next = calc_x(mid + 1);
			int a = now.second - now.first;
			int b = next.second - next.first;
			if (a - b >= border) {
				bot = mid;
			}
			else {
				top = mid;
			}
		}
		if (top != 1e10)
			timing.push_back(bot);
	}
	timing.push_back(0);
	long long ans = -1;
	REP(i, timing.size()) {
		for (int j = -100; j <= 100; ++j) {
			timing[i] += j;
			if (timing[i] >= 0) {
				pair<long long, long long> now = calc_x(timing[i]);
				long long pre_ans = now.second - now.first;
				now = calc_y(timing[i]);
				if (now.second - now.first == 0) {
					ans = 0;
					continue;
				}
				if (ans == -1) {
					if (LLONG_MAX / (now.second - now.first) >= pre_ans - 1LL) {
						ans = pre_ans * (now.second - now.first);
					}
				}
				else {
					if (ans / (now.second - now.first) >= pre_ans -1LL) {
						pre_ans *= now.second - now.first;
						ans = min(ans, pre_ans);
					}
				}
			}
			timing[i] -= j;
		}
	}
	cout << ans / 4LL;
	if (ans % 4LL == 1LL) {
		cout << ".25";
	}
	else if (ans % 4LL == 2LL) {
		cout << ".5";
	}
	else if (ans % 4LL == 3LL) {
		cout << ".75";
	}
	cout << endl;
	return 0;
}


Measured memory_bytes: 4980