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

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
typedef long long ll;
typedef pair<int,int> pii;
const int INF = 1<<29;
const double PI = acos(-1);
const double EPS = 1e-8;

template<class T> T lower_search(T lb, T ub, bool (*C)(T)) {
  REP(i,100) {
    T mid = (lb+ub)/2;
    if (C(mid)) ub = mid;
    else lb = mid;
  }
  return ub;
}

int N;
double L;
const int NUM = 100000;
int s[NUM], t[NUM], u[NUM];

bool C(double x) {
  int now = 0;
  double vol = L;
  REP(i,N) {
    vol = min(x*(s[i]-now)+vol, L);
    vol = min((x-u[i])*(t[i]-s[i])+vol, L);
    if (vol<0) return 0;
    now = t[i];
  }
  vol = min(x*(86400-t[N-1])+vol, L);
  double hoge = vol;
  now = 0;
  REP(i,N) {
    vol = min(x*(s[i]-now)+vol, L);
    vol = min((x-u[i])*(t[i]-s[i])+vol, L);
    if (vol<0) return 0;
    now = t[i];
  }
  vol = min(x*(86400-t[N-1])+vol, L);
  if(vol+EPS<hoge) return 0;
  return 1;
}

int main() {
  while(cin>>N>>L,N||L) {
    REP(i,N) cin>>s[i]>>t[i]>>u[i];
    double ans = lower_search<double>(0,INF,C);
    printf("%.10f\n", ans);
  }
}