#include <bits/stdc++.h>
using namespace std;
long long a[100005], b[100005];
int main() {
  ios::sync_with_stdio(false);
  int n;
  long long p;
  cin >> n >> p;
  long long s = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    s += a[i];
  }
  if (p >= s) {
    cout << "-1";
    return 0;
  }
  double l = 0, r = 10000000000;
  double t;
  while (r - l > 1e-5) {
    t = (l + r) / 2;
    double res = 0;
    for (int i = 0; i < n; i++) {
      res += max((double)0, a[i] * t - b[i]);
    }
    if (res <= p * t) {
      l = t;
    } else {
      r = t;
    }
  }
  cout.precision(8);
  cout << r;
  return 0;
}
