#include #include #include #include int main(){ int n, t = 0; long double w, v = 0; std::cin >> n >> w; std::vector> ms(n); for (std::pair &m : ms) std::cin >> m.second >> m.first; std::sort(ms.begin(), ms.end()); for (std::pair &m : ms){ if (v*(2*m.first-t) >= w) break; w -= v*(2*m.first-t); t = 2*m.first; v += m.second; } std::cout << t+w/v << std::endl; return 0; }