#include <iostream>
#include <cmath>
#include <numeric>
#include <algorithm>
#include <deque>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <set>
#include <iomanip>
#include <map>
#include <stack>
#include <queue>
#include <functional>
#include <climits>
#include <numeric>
#include <bitset>
#include <random>
#include <tuple>
#include <initializer_list>
#include <fstream>
#include <cctype>
#include <string>
#include <cfloat>

struct Coordinate {
	int x, y;
};
int main() {
	int n; std::cin >> n;
	std::unordered_map<char, std::vector<Coordinate>> coordinates;
	for (auto i = 0; i < n; ++i) {
		int x, y; char d; std::cin >> x >> y >> d;
		coordinates[d].push_back(Coordinate{ x, y });
	}
	constexpr double MAX = 200000000;
	double const_min_x = MAX;
	double const_max_x = -MAX;
	double const_min_y = MAX;
	double const_max_y = -MAX;
	double min_up = MAX;
	double max_up = -MAX;
	double min_down = MAX;
	double max_down = -MAX;
	double min_right = MAX;
	double max_right = -MAX;
	double min_left = MAX;
	double max_left = -MAX;
	for (const auto c : coordinates['U']) {
		const_min_x = std::min<double>(const_min_x, c.x);
		const_max_x = std::max<double>(const_max_x, c.x);
		min_up = std::min<double>(min_up, c.y);
		max_up = std::max<double>(max_up, c.y);
	}
	for (const auto c : coordinates['D']) {
		const_min_x = std::min<double>(const_min_x, c.x);
		const_max_x = std::max<double>(const_max_x, c.x);
		min_down = std::min<double>(min_down, c.y);
		max_down = std::max<double>(max_down, c.y);
	}
	for (const auto c : coordinates['R']) {
		const_min_y = std::min<double>(const_min_y, c.y);
		const_max_y = std::max<double>(const_max_y, c.y);
		min_right = std::min<double>(min_right, c.x);
		max_right = std::max<double>(max_right, c.x);
	}
	for (const auto c : coordinates['L']) {
		const_min_y = std::min<double>(const_min_y, c.y);
		const_max_y = std::max<double>(const_max_y, c.y);
		min_left = std::min<double>(min_left, c.x);
		max_left = std::max<double>(max_left, c.x);
	}

	std::vector<double> change_time{ 0 };
	if (const_min_y > min_up) change_time.push_back(const_min_y - min_up);
	if (const_min_y < min_down) change_time.push_back(min_down - const_min_y);
	if (min_up < min_down) change_time.push_back((min_down - min_up) / 2.0);
	if (const_max_y > max_up) change_time.push_back(const_max_y - max_up);
	if (const_max_y < max_down) change_time.push_back(max_down - const_max_y);
	if (max_up < max_down) change_time.push_back((max_down - max_up) / 2.0);
	if (const_min_x > min_right) change_time.push_back(const_min_x - min_right);
	if (const_min_x < min_left) change_time.push_back(min_left - const_min_x);
	if (min_right < min_left) change_time.push_back((min_left - min_right) / 2.0);
	if (const_max_x < max_left) change_time.push_back(max_left - const_max_x);
	if (const_max_x > max_right) change_time.push_back(const_max_x - max_right);
	if (max_right < max_left) change_time.push_back((max_left - max_right) / 2.0);
	double min = DBL_MAX;
	for (const auto time : change_time) {
		const auto min_x = std::min({ (double)const_min_x, min_right + time, min_left - time });
		const auto max_x = std::max({ (double)const_max_x, max_right + time, max_left - time });
		const auto min_y = std::min({ (double)const_min_y, min_up + time, min_down - time });
		const auto max_y = std::max({ (double)const_max_y, max_up + time, max_down - time });
		min = std::min(min, (max_x - min_x) * (max_y - min_y));
	}
	std::cout << std::setprecision(15) << std::fixed << min << std::endl;
}

Measured memory_bytes: 1312