#include<bits/stdc++.h>
#define REP(x,y,z) for(int x=y;x<=z;x++)
#define FORD(x,y,z) for(int x=y;x>=z;x--)
#define MSET(x,y) memset(x,y,sizeof(x))
#define FOR(x,y) for(__typeof(y.begin()) x=y.begin();x!=y.end();x++)
#define F first
#define S second
#define MP make_pair
#define PB push_back
#define SZ size()
#define M 205
void RI(){}
template<typename... T>
void RI( int& head, T&... tail ) {
    scanf("%d",&head);
    RI(tail...);
}
using namespace std;
typedef long long LL;
int n,m;
double cur[M], dp[M];
int main()
{
	int x,y,cnt;
	
	RI(n,m);
	dp[0] = 0;
	REP(i,1,m) dp[i] = -1e100;
	REP(i,1,n)
	{
		RI(cnt);
		int sum=0;

		cur[0] = 0;
		while(cnt--)
		{
			RI(x,y);
			REP(j, sum+1, min(m ,sum+x*y))
				cur[j] = cur[j-1] + 1.0/x;
			sum += x*y;
		}
		sum = min(sum, m);

		FORD(j,m,1) REP(k,1, min(j,sum) ) if(dp[j-k]>=0) dp[j] = max(dp[j], dp[j-k]+cur[k]);
	}

	printf("%.10f\n", dp[m]);
	return 0;
}