#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
using P = pair<double,double>;

int N;
double L;
vector<P> V;

bool eval(double u){
    double l=L;
    for(auto v:V){
        l+=v.first*(u-v.second);
        l=min(L,l);
        if(l<=0) return false;
    }
    double l1=l;
    for(auto v:V){
        l+=v.first*(u-v.second);
        l=min(L,l);
        if(l<=0) return false;
    }
    return abs(l1-l)<1e-9;
}

int main(){
    while(cin>>N>>L,N){
        V.clear();
        int s,t=0,u;
        for(int i=0;i<N;i++){
            cin>>s;
            if(s-t) V.emplace_back(s-t,0);
            cin>>t>>u;
            V.emplace_back(t-s,u);
        }
        if(t!=86400)V.emplace_back(86400-t,0);
        double lb=0, ub=1e6;
        for(int i=0;i<50;i++){
            if(eval((lb+ub)/2)){
                ub=(lb+ub)/2;
            }else{
                lb=(lb+ub)/2;
            }
        }
        cout<<fixed;
        cout.precision(6);
        cout<<lb<<endl;        
    }

    return 0;
}