#include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <cfloat>
#include <climits>
#include <ctime>
#include <cassert>
#include <numeric>
#include <fstream>
#include <functional>
#include <bitset>

using namespace std;
#define int long long int
const int INF = 1001001001001001LL;
const int MOD = 1000000007;

double s[210][22];
double h[210][22];

signed main(){
    
    double n, m; cin >> n >> m;
    vector<int> k(n);
    
    for(int i = 0; i < n; i++){
        cin >> k[i];
        for(int j = 0; j < k[i]; j++){
            cin >> s[i][j] >> h[i][j];
        }
    }
    
    double ans = 0.0;

    for(int ii = 0; ii < n; ii++){

        vector<vector<double> > dp(n + 1, vector<double> (m + 1, -1.0));
        dp[0][0] = 0.0;
        for(int i = 0; i < n; i++){
        
            if(ii == i){
                for(int j = 0; j <= m; j++) dp[i + 1][j] = dp[i][j];
                continue;
            }


            for(int j = 0; j <= m; j++){
                if(dp[i][j] < 0.0) continue;

                int nj = j;
                dp[i + 1][nj] = max(dp[i + 1][nj], dp[i][j]);
                double val = 0.0;
                for(int l = 0; l < k[i]; l++){
                    // とるぜ
                    nj += s[i][l] * h[i][l];
                    val += h[i][l];
                    if(nj <= m) dp[i + 1][nj] = max(dp[i + 1][nj], dp[i][j] + val); 
                }
            }
        }
        
        for(int j = 0; j <= m; j++){
            
            double rest = m - j;
            double high = 0.0;

            for(int l = 0; l < k[ii]; l++){
                if(rest >= s[ii][l] * h[ii][l]){
                    rest -= s[ii][l] * h[ii][l];
                    high += h[ii][l];
                }else{
                    high += rest / s[ii][l];
                    break;
                }
            }
            
            if(dp[n][j] != -1.0) ans = max(ans, dp[n][j] + high);
        }

    }

    printf("%.10f\n", ans);

    return 0;
}


