#include <bits/stdc++.h>
using namespace std;
int n, a[100000], b[100000];
long long p, sum;
bool can(double time) {
  double c = time * p;
  for (int i = 0; i < n; ++i) c += min(0.0, b[i] - a[i] * time);
  return c > 0;
}
int main() {
  cin >> n >> p;
  for (int i = 0; i < n; ++i) {
    cin >> a[i] >> b[i];
    sum += a[i];
  }
  if (p >= sum)
    cout << -1;
  else {
    double l = 0, r = 2e10;
    while (abs(l - r) > 1e-4) {
      double mid = (l + r) / 2;
      if (can(mid))
        l = mid;
      else
        r = mid;
    }
    cout << fixed << setprecision(4) << (l + r) / 2;
  }
  return 0;
}
