#include<bits/stdc++.h>

#define REP(i,s,n) for(int i=s;i<n;++i)
#define rep(i,n) REP(i,0,n)
#define EPS (1e-8)
#define equals(a,b) (fabs((a)-(b))<EPS)

using namespace std;

bool LTE(double a,double b) { return equals(a,b) || a < b; }
bool LT(double a,double b) { return !equals(a,b) && a < b; }

int n,m,K[201],S[201][21],H[201][21];
double cost[210][210];
double dp[210];

void compute() {
  rep(i,n) {
    rep(j,m+1) {
      int remain = j;
      rep(k,K[i]) {
        if( remain == 0 ) break;
        if( 0 < S[i][k] * H[i][k] && S[i][k] * H[i][k] <= remain ) {
          cost[i][j] += H[i][k];
          remain -= S[i][k] * H[i][k];
        } else {
          cost[i][j] += (double)remain/(double)S[i][k];
          remain = 0;
        }
      }
    }
  }
  rep(i,n) {
    for(int j=m;j>=0;--j) {
      rep(k,m+1) {
        if( j+k <= m && LT(dp[j+k],dp[j] + cost[i][k]) ) {
          dp[j+k] = dp[j] + cost[i][k];
        }
      }
    }
  }
  printf("%.10f\n",dp[m]);
}

int main() {
  cin >> n >> m;
  rep(i,n) {
    cin >> K[i];
    rep(j,K[i]) cin >> S[i][j] >> H[i][j];
  }
  compute();
  return 0;
}