#define _USE_MATH_DEFINES

#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>

using namespace std;

typedef pair<long long int, long long int> P;

long long int INF = 1e18;
long long int MOD = 1e9 + 7;

int main(){
    int N, M;
    cin >> N >> M;
    double DP[300] = {};
    for(int loop = 0; loop < N; loop++){
        int K;
        cin >> K;
        double PS[300] = {};
        int pos = 0;
        for(int i = 0; i < K; i++){
            int S, H;
            cin >> S >> H;
            for(int j = 1; j <= S * H; j++){
                if(pos + j > M){
                    break;
                }
                PS[pos + j] = PS[pos] + j / (double)S;
            }
            pos += S * H;
        }
        for(int i = M; i >= 0; i--){
            for(int j = 0; i + j <= M; j++){
                DP[i + j] = max(DP[i + j], DP[i] + PS[j]);
            }
        }
    }
    printf("%.10f\n", DP[M]);
    return 0;
}
