#include<bits/stdc++.h>
using namespace std;
using Int = long long;
signed main(){
  Int n;
  double l;
  while(cin>>n>>l,n){
    vector<double> s(n),t(n),u(n);
    for(Int i=0;i<n;i++) cin>>s[i]>>t[i]>>u[i];
    auto check2=[&](double x,double y){
      y=min(y+x*s[0],l);
      for(Int i=0;i<n;i++){
	y+=(x-u[i])*(t[i]-s[i]);
	if(y<=0) return double(-1);
	y=min(y,l);
	if(i+1<n)
	  y=min(y+x*(s[i+1]-t[i]),l);
      }
      y=min(y+x*(86400-t[n-1]),l);
      return y;
    };
    auto check=[&](double x){
      if(check2(x,l)<0) return false;
      if(check2(x,l)==l) return true;
      double lb=0,ub=l;
      for(Int i=0;i<50;i++){
	double mid=(lb+ub)/2;
	if(check2(x,mid)<0) lb=mid;
	else ub=mid;
      }
      //cout<<x<<" "<<ub<<":"<<check2(x,ub)<<endl;
      return check2(x,ub)>=ub;
    };
    double lb=0,ub=*max_element(u.begin(),u.end());
    for(Int i=0;i<50;i++){
      double mid=(lb+ub)/2;
      if(check(mid)) ub=mid;
      else lb=mid;
    }
    //cout<<n<<" "<<l<<endl;
    cout<<fixed<<setprecision(12)<<ub<<endl;
  }
  return 0;
}

