#include <bits/stdc++.h>
using namespace std;
#define int long long
// #define double long double
#define REP(i, n) for (int i = 0; i < (n); i++)

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    n--;
    int A;
    cin >> A;
    vector<int> a(n);
    vector<vector<double>> b(3, vector<double>(n));
    REP(i, n) cin >> a[i] >> b[0][i] >> b[1][i] >> b[2][i];
    REP(i, n) b[0][i] /= 100, b[1][i] /= 100, b[2][i] /= 100;

    vector<double> dp(1 << n, -1);
    dp[0] = 1;
    function<double(int)> dfs = [&](int S) {
        if (dp[S] != -1) return dp[S];
        double ret = 0;
        bool ok = true;
        REP(i, n) {
            if ((S >> i & 1) && a[i] > A) ok = false;
        }
        REP(c, 3) {
            double acc = 0.0;
            double draw = 1.0;
            for (int T = S;; T = (T - 1) & S) {
                if (T == S) continue;
                double win = 1.0, lose = 1.0;
                REP(i, n) {
                    if ((S >> i & 1) == 0) continue;
                    win *= ((T >> i & 1) ? b[c][i] : b[(c + 2) % 3][i]);
                    lose *= ((T >> i & 1) ? b[(c) % 3][i] : b[(c + 1) % 3][i]);
                }
                acc += dfs(T) * win;
                draw -= win + lose;
                // acc += exp(dfs(T) + win);
                // draw -= exp(win) + exp(lose);
                if (T == 0) break;
            }
            if (ok) acc += draw;
            ret = max(ret, acc);
        }
        return dp[S] = ret;
    };
    int all = (1 << n) - 1;
    dfs(all);
    // REP(i, 1 << n) cout << i << " " << dp[i] << endl;
    cout << setprecision(20) << dp[all] << endl;
}

