#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <cmath>
#include <cstdio>

using namespace std;

typedef pair<int, int> P;

int N, M;

void print(double a[201][201]){
  for(int i = 0; i < N; ++i){
    for(int j = 0; j <= M; ++j){
      cout << a[i][j] << " ";
    }
    cout << endl;
  }
}

int main(){
  cin >> N >> M;
  vector<P> vec[201];
  for(int i = 0; i < N; ++i){
    int K;
    cin >> K;
    for(int j = 0; j < K; ++j){
      int S, H;
      cin >> S >> H;
      vec[i].push_back(make_pair(S, H));
    }
  }

  double V[201][201];
  for(int i = 0; i < N; ++i){
    for(int j = 0; j <= M; ++j){
      V[i][j] = 0;
    }
  }

  //print(V); cout << endl;
  
  for(int i = 0; i < N; ++i){
    double sum = 0;
    int p = 0;
    for(int j = 1; j <= M; ++j){
      if(p == vec[i].size()){
	break;
      }
      V[i][j] = V[i][j-1] + 1.0 / vec[i][p].first;
      if(abs(vec[i][p].first * vec[i][p].second + sum - j) < 1e-8){
	sum = j;
	++p;
      }
    }
  }

  //print(V);

  double dp[201][201];
  for(int i = 0; i <= N; ++i){
    for(int j = 0; j <= M; ++j){
      dp[i][j] = 0;
    }
  }

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

  double ans = 0;
  for(int i = 0; i <= N; ++i){
    for(int j = 0; j <= M; ++j){
      ans = max(ans, dp[i][j]);
    }
  }
  printf("%.8f\n", ans);
}