#include <bits/stdc++.h>
using namespace std;
long long n, p;
long long a[100005], b[100005];
bool f(double x) {
  double tot = 0;
  long long i;
  for (i = 0; i <= n - 1; i++) {
    tot += max(0.0, x * a[i] - b[i]);
  }
  tot /= x;
  return p >= tot;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> p;
  long long i;
  long long tot = 0;
  for (i = 0; i <= n - 1; i++) cin >> a[i] >> b[i], tot += a[i];
  if (p >= tot) {
    cout << -1;
    return 0;
  }
  int t = 200;
  double l = 0, r = 1e10, mid;
  while (t--) {
    mid = (l + r) / 2;
    if (f(mid))
      l = mid;
    else
      r = mid;
  }
  cout.precision(6);
  cout << mid;
  return 0;
}
