import std.stdio, std.string, std.conv;
import std.range, std.algorithm, std.array, std.typecons, std.container;
import std.math, std.numeric, core.bitop;

enum inf3 = 1_001_001_001;
enum inf6 = 1_001_001_001_001_001_001L;
enum mod = 1_000_000_007;

double[] kouho = [0.0];


void main() {
    int n;
    scan(n);

    auto x = new int[](n);
    auto y = new int[](n);
    auto d = new char[](n);

    int xsl, xll; char xdl;
    int xsr, xrr; char xdr;
    xsl = xll = inf3;
    xsr = xrr = -inf3;

    int ysl, yll; char ydl;
    int ysr, yrr; char ydr;

    ysl = yll = inf3;
    ysr = yrr = -inf3;

    foreach (i ; 0 .. n) {
        scan(x[i], y[i], d[i]);
        if (x[i] < xsl) {
            xsl = x[i];
            if (d[i] == 'L' || d[i] == 'R') xdl = d[i];
            else xdl = 'N';
        }
        if (d[i] == 'L' && x[i] < xll) {
            xll = x[i];
        }
        if (x[i] > xsr) {
            xsr = x[i];
            if (d[i] == 'L' || d[i] == 'R') xdr = d[i];
            else xdr = 'N';
        }
        if (d[i] == 'R' && x[i] > xrr) {
            xrr = x[i];
        }

        if (y[i] < ysl) {
            ysl = y[i];
            if (d[i] == 'D') ydl = 'L';
            else if (d[i] == 'U') ydl = 'R';
            else ydl = 'N';
        }
        if (d[i] == 'D' && y[i] < yll) {
            yll = y[i];
        }
        if (y[i] > ysr) {
            ysr = y[i];
            if (d[i] == 'D') ydr = 'L';
            else if (d[i] == 'U') ydr = 'R';
            else ydr = 'N';
        }
        if (d[i] == 'U' && y[i] > yrr) {
            yrr = y[i];
        }
    }


    choose(xsl, xdl, xll, xsr, xdr, xrr);
    choose(ysl, ydl, yll, ysr, ydr, yrr);

    debug {
        writeln(kouho);
        writefln("ysr:%s, yrr:%d, ydr:%s", ysr, yrr, ydr);
    }

    double ans = double.max;

    foreach (ti ; kouho) {
        double xdif = calcdif(xsl, xdl, xll, xsr, xdr, xrr, ti);
        double ydif = calcdif(ysl, ydl, yll, ysr, ydr, yrr, ti);
        ans = min(ans, xdif * ydif);
    }

    writefln("%.12f", ans);
}

double calcdif(int sl, char dl, int ll, int sr, char dr, int rr, double t) {
    double xmin = sl + (dl == 'N' ? 0 : t);
    if (ll < inf3) xmin = min(xmin, ll - t);
    double xmax = sr - (dr == 'N' ? 0 : t);
    if (rr > -inf3) xmax = max(xmax, rr + t);
    return xmax - xmin;
}


void choose(int sl, char dl, int ll, int sr, char dr, int rr) {
    if (sl < ll) {
        if (dl == 'N') {
            kouho ~= ll - sl;
        }
        if (dl == 'R') {
            kouho ~= (ll - sl) / 2.0;
        }
    }
    if (sr > rr) {
        if (dr == 'N') {
            kouho ~= sr - rr;
        }
        if (dr == 'L') {
            kouho ~= (sr - rr) / 2.0;
        }
    }
}

















int[][] readGraph(int n, int m, bool isUndirected = true, bool is1indexed = true) {
    auto adj = new int[][](n, 0);

    foreach (i; 0 .. m) {
        int u, v;
        scan(u, v);
        if (is1indexed) {
            u--, v--;
        }
        adj[u] ~= v;
        if (isUndirected) {
            adj[v] ~= u;
        }
    }

    return adj;
}

alias Edge = Tuple!(int, "to", int, "cost");

Edge[][] readWeightedGraph(int n, int m, bool isUndirected = true, bool is1indexed = true) {
    auto adj = new Edge[][](n, 0);

    foreach (i; 0 .. m) {
        int u, v, c;
        scan(u, v, c);
        if (is1indexed) {
            u--, v--;
        }
        adj[u] ~= Edge(v, c);
        if (isUndirected) {
            adj[v] ~= Edge(u, c);
        }
    }

    return adj;
}

void yes(bool b) {
    writeln(b ? "Yes" : "No");
}

void YES(bool b) {
    writeln(b ? "YES" : "NO");
}

T[] readArr(T)() {
    return readln.split.to!(T[]);
}

T[] readArrByLines(T)(int n) {
    return iota(n).map!(i => readln.chomp.to!T).array;
}

void scan(T...)(ref T args) {
    import std.stdio : readln;
    import std.algorithm : splitter;
    import std.conv : to;
    import std.range.primitives;

    auto line = readln().splitter();
    foreach (ref arg; args) {
        arg = line.front.to!(typeof(arg));
        line.popFront();
    }
    assert(line.empty);
}

void fillAll(R, T)(ref R arr, T value) {
    static if (is(typeof(arr[] = value))) {
        arr[] = value;
    }
    else {
        foreach (ref e; arr) {
            fillAll(e, value);
        }
    }
}

bool chmin(T, U...)(ref T x, U args) {
    bool isChanged;

    foreach (arg; args) {
        if (x > arg) {
            x = arg;
            isChanged = true;
        }
    }

    return isChanged;
}

bool chmax(T, U...)(ref T x, U args) {
    bool isChanged;

    foreach (arg; args) {
        if (x < arg) {
            x = arg;
            isChanged = true;
        }
    }

    return isChanged;
}
