#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 110;
int n;
double p, a[N], b[N];
long long sum;
int fun(double mid) {
  double t = p * mid;
  for (int i = 1; i <= n; i++) {
    double t1 = a[i] * mid - b[i];
    if (t1 > 0) t -= t1;
    if (t <= 0) return 0;
  }
  return 1;
}
int main() {
  cin >> n >> p;
  for (int i = 1; i <= n; i++) {
    cin >> a[i] >> b[i];
    sum += a[i];
  }
  if (p >= sum) {
    cout << -1 << endl;
    return 0;
  } else {
    double l = 0.00, r = 1e12 * 1.0, mid;
    while (fabs(r - l) > 1e-4) {
      mid = (l + r) / 2.0;
      if (fun(mid))
        l = mid;
      else
        r = mid;
    }
    cout << l << endl;
  }
}
