loop {
	n, l = gets.split.map &:to_i
	break if n == 0
	events = []
	(1..n).each {
		s, t, u = gets.split.map &:to_i
		events << [s, u]
		events << [t, -u]
	}
	events.sort!
	
	check = -> pump {
		w = l
		log = []
		2.times {
			queue = Marshal.load(Marshal.dump(events))
			queue << [86400, 0]
			dw = pump
			t0 = 0

			until queue.empty?
				t = queue[0][0]
				w = [w + dw * (t - t0), l].min
				return false if w < 0
				while !queue.empty? && queue[0][0] == t
					dw -= queue.shift[1]
				end
				#p [t, w, dw]
				t0 = t
			end
			log << w
		}

		return log[0] == log[1]
	}

	min = 0
	max = events.map(&:last).map{|x| x > 0 ? x : 0}.inject(:+)

	until (max - min).abs < 0.0000001
		c = (min + max) / 2.0
		if check[c]
			max = c
		else
			min = c
		end
	end
	printf("%.7f\n", min)
}