#include <bits/stdc++.h>
using namespace std;

int n, m;
vector<double> v[200];
double dp[201];

int main()
{
	scanf("%d %d", &n, &m);
	for (int i = 0; i < n; i++){
		int k;
		scanf("%d", &k);
		v[i].assign(1, 0);
		while (k--){
			int s, h;
			scanf("%d %d", &s, &h);
			for (int j = 0; j < s * h; j++){
				v[i].push_back(1.0 / s);
			}
		}
		for (int j = 0; j + 1 < v[i].size(); j++){
			v[i][j + 1] += v[i][j];
		}
	}
	for (int i = 0; i < n; i++){
		for (int j = m - 1; j >= 0; j--){
			for (int k = 1; j + k <= m; k++){
				if (k >= v[i].size()) break;
				dp[j + k] = max(dp[j + k], dp[j] + v[i][k]);
			}
		}
	}
	
	printf("%.20f\n", dp[m]);
}