#include <bits/stdc++.h>
using namespace std;
int n;
long double dc[100000], dp[100000], p;
bool canlive(long double t) {
  long double c = p * t;
  for (int i = 0; i < n; ++i) {
    long double rc = dc[i] - dp[i] * t;
    if (rc < 0) {
      c += rc;
      if (c < 0) {
        return false;
      }
    }
  }
  return true;
}
int main(int argc, char *argv[]) {
  cin >> n >> p;
  long long rp = p;
  for (int i = 0; i < n; ++i) {
    int t;
    cin >> t >> dc[i];
    dp[i] = t;
    rp -= t;
  }
  if (rp >= 0) {
    cout << -1 << endl;
  } else {
    long double l = 0, r = 1;
    while (canlive(r)) {
      r *= 2;
    }
    while ((r - l) / max(1.0L, l) >= 1e-4L) {
      long double c = (l + r) / 2;
      if (canlive(c)) {
        l = c;
      } else {
        r = c;
      }
    }
    cout.precision(30);
    cout << ((l + r) / 2) << endl;
  }
  return 0;
}
