#include <bits/stdc++.h>
using namespace std;
struct Pot{
  int S;
  int H;
  Pot():S(0),H(0){}
  Pot(int S, int H):S(S),H(H){}
};

double height(const int idx, const int water_, const vector< vector< Pot > >& P){
  double res = 0.0;
  double water = (double)water_;
  vector<Pot> p = P[idx];

  for(int i = 0; i < p.size(); i++){
    Pot pot = p[i];
    int pot_size = p[i].S * p[i].H;
    if(water >= pot_size){
      res += p[i].H;
      water -= pot_size;
    }else{
      res += water / p[i].S;
      break;
    }
  }
  return res;
}

int main(void){
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N, M; cin >> N >> M;
  vector< vector< Pot > > P(N);
  for(int i = 0; i < N; i++){
    int K; cin >> K;
    for(int j = 0; j < K; j++){
      int S, H; cin >> S >> H;
      P[i].push_back( Pot(S, H) );
    }
  }

  double dp[N+1][M+1];
  for(int i = 0; i <= N; i++) for(int j = 0; j <= M; j++) dp[i][j] = -5000;

  for(int j = 0; j <= M; j++){
    dp[0][M-j] = height(0, j, P);
    //cout << dp[0][j] << endl;
  }

  for(int i = 1; i < N; i++){
    for(int j = M; j >= 0; j--){
      for(int k = 0; k <= j; k++){
        dp[i][j-k] = max(dp[i][j-k], dp[i-1][j] + height(i, k, P));
      }
    }
  }

  //cout << dp[1][1] << endl;
  double ans = 0;
  for(int j = 0; j <= M; j++){
    ans = max(ans, dp[N-1][j]);
  }
  cout << fixed << setprecision(10) << ans << endl;
  return 0;
}