#include <bits/stdc++.h>
using namespace std;
int n;
double p, a[100005], b[100005];
bool jug(double t) {
  double charge = p * 1.0 * t;
  double sub;
  for (int i = 0; i < n; i++) {
    sub = a[i] * t - b[i];
    if (sub > 0) charge -= sub;
    if (charge < 0) return false;
  }
  return true;
}
const double eps = 1e-8;
int main() {
  double sum = 0;
  while (cin >> n >> p) {
    for (int i = 0; i < n; i++) {
      cin >> a[i] >> b[i];
      sum += a[i];
    }
    if ((p - sum) >= -eps) {
      cout << -1 << endl;
      return 0;
    }
    double r = 1e16, l = 0, mid, ans;
    while ((r - l) > eps) {
      mid = (l + r) / 2;
      if (jug(mid)) {
        l = mid;
        ans = mid;
      } else {
        r = mid;
      }
    }
    printf("%.8lf\n", ans);
  }
}
