#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <numeric>
#include <utility>
#include <iomanip>
#include <algorithm>
#include <functional>
using namespace std;

typedef long long ll;
typedef vector<int> vint;
typedef vector<ll> vll;
typedef pair<int,int> pint;

#define DE 1
#define FI first
#define SE second
#define PB push_back
#define MP make_pair
#define ALL(s) (s).begin(),(s).end()
#define REP(i,n) for (int i = 0; i < (int)(n); ++i)
#define EACH(i,s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
#define COUT(x) cout<<#x<<" = "<<(x)<<" (L"<<__LINE__<<")"<<endl

template<class T1, class T2> ostream& operator<<(ostream &s, pair<T1,T2> P){return s<<'<'<<P.first<<", "<<P.second<<'>';}
template<class T> ostream& operator<<(ostream &s, vector<T> P) {s<<"{ ";for(int i=0;i<P.size();++i){if(i>0)s<<", ";s<<P[i];}return s<<" }"<<endl;}
template<class T1, class T2> ostream& operator<<(ostream &s, map<T1,T2> P) {s<<"{ ";for(__typeof__(P.begin()) it=P.begin();it!=P.end();++it){if(it!=P.begin())s<<", ";s<<'<'<<it->first<<"->"<<it->second<<'>';}return s<<" }"<<endl;}


const int MAXN = 2050;
const int MAXM = 2050;
double evis[MAXM], edan[MAXM], evoc[MAXM];

int n, m;
int vis[MAXN], dan[MAXN], voc[MAXN];
double p = 1.0/3;


double Prob[MAXM];
void calc_Btry(double p, int n) {
    Prob[0] = 1.0;
    for (int i = 1; i <= n; ++i) Prob[i] = 0.0;
    for (int i = 0; i < n; ++i) {
        for (int j = i; j >= 0; --j) {
            Prob[j+1] += Prob[j] * p;
            Prob[j] *= 1.0-p;
        }
    }
    for (int i = n; i > 0; --i) {
        Prob[i-1] += Prob[i];
    }
}

void precalc(double *E, int *point, int audpoint) {
    for (int i = 0; i <= m; ++i) {
        int M = i*point[0];
        
        double dp[MAXN][3];
        double loseprob = 1.0;
        REP(j,MAXN) REP(k,3) dp[j][k] = 0.0;
        dp[1][0] = 1.0;
        for (int j = 1; j < n; ++j) {
            int bey = (M+point[j]-1)/point[j];
            if (bey > m) bey = m+1;
            dp[j+1][0] = dp[j][0] * (1.0 - Prob[bey]);
            dp[j+1][1] = dp[j][0] * Prob[bey] + dp[j][1] * (1.0 - Prob[bey]);
            dp[j+1][2] = dp[j][1] * Prob[bey] + dp[j][2] * (1.0 - Prob[bey]);
            loseprob *= Prob[bey];
        }
        
        E[i] = (dp[n][0] + dp[n][1] + dp[n][2]) * audpoint - loseprob;
    }
        
}

int main() {
    while (cin >> n >> m) {
        calc_Btry(p, m);
        for (int i = 0; i < n; ++i) {
            cin >> vis[i] >> dan[i] >> voc[i];
        }
        precalc(evis, vis, 5);
        precalc(edan, dan, 3);
        precalc(evoc, voc, 2);
        
        double res = -1000000000.0;
        for (int i = 0; i <= m; ++i) {
            for (int j = 0; i+j <= m; ++j) {
                int k = m-i-j;
                double temp = evis[i] + edan[j] + evoc[k];
                res = max(res, temp);
            }
        }
        
        cout << fixed << setprecision(16) << res << endl;
    }
    
    return 0;
}


Measured memory_bytes: 1364