#include <bits/stdc++.h>
struct AB {
  int a, b;
};
bool operator<(const AB &l, const AB &r) {
  double tl = l.b * 1.0 / l.a, tr = r.b * 1.0 / r.a;
  return (std::abs(tl - tr) < 1e-7 ? l.a > r.a : tl < tr);
}
int main() {
  std::ios_base::sync_with_stdio(false);
  int n, p;
  std::cin >> n >> p;
  AB ab[n];
  for (int i = 0; i < n; ++i) std::cin >> ab[i].a >> ab[i].b;
  std::sort(ab, ab + n);
  long long sum_a = 0, sum_b = 0;
  double t = 1e12;
  for (int i = 0; i < n; ++i) {
    sum_a += ab[i].a;
    sum_b += ab[i].b;
    if (sum_a > p) t = std::min(t, sum_b * 1.0 / (sum_a - p));
  }
  if (t > 1e11)
    std::cout << -1 << std::endl;
  else
    std::cout << std::fixed << std::setprecision(9) << t << std::endl;
  return 0;
}
