#include <iostream>
#include <fstream>
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <sstream>
#include <string>
#include <vector>
using namespace std;

#define EPS 1e-9
#define INF MOD
#define MOD 1000000007LL
#define fir first
#define iss istringstream
#define sst stringstream
#define ite iterator
#define ll long long
#define mp make_pair
#define rep(i,n) rep2(i,0,n)
#define rep2(i,m,n) for(int i=m;i<n;i++)
#define pi pair<int,int>
#define pb push_back
#define sec second
#define sh(i) (1LL<<i)
#define sz size()
#define vi vector<int>
#define vc vector
#define vl vector<ll>
#define vs vector<string>

int N;
double L,s[87000],t[87000],u[87000];

int main(){
	while(cin>>N>>L&&N){
		t[0]=u[N+1]=0,s[N+1]=t[N+1]=86400;
		rep(i,N)cin>>s[i+1]>>t[i+1]>>u[i+1];
		double lo=0,hi=1e6;
		rep(h,50){
			double mi=(lo+hi)/2,l=L,x;
			int ok=1;
			rep(i,2){
				rep2(j,1,N+2){
					l=min(L,l+mi*(s[j]-t[j-1]));
					l=min(L,l+(mi-u[j])*(t[j]-s[j]));
					if(l<=0){ok=0;break;}
				}
				if(!ok)break;
				if(!i)x=l;
				else ok&=l+EPS>x;
			}
			ok?hi=mi:lo=mi;
		}
		printf("%.7f\n",(lo+hi)/2);
	}
}