### Greedy after mill distance n, w = map(int, input().split()) mills = sorted((tuple(map(int, input().split())) for _ in range(n)), key=lambda x: x[1]) times = [] for i in range(n): # assume we use mills 0, ..., i travel_time_for_last_mill = 2 * mills[i][1] # How much wheat can we process at the nearer mills while driving to the farthest? wheat_at_nearer_mills = sum((travel_time_for_last_mill - 2*t) * p for p, t in mills[:i]) if w > wheat_at_nearer_mills: # If there's wheat left to process, all mills 0..i can now work total_processing = sum(p for p, _ in mills[:i+1]) parallel_time = (w - wheat_at_nearer_mills) / total_processing times.append(travel_time_for_last_mill + parallel_time) else: times.append(travel_time_for_last_mill) print(min(times))