#include <bits/stdc++.h>
using namespace std;
double a[100005], b[100005];
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  double p;
  cin >> n >> p;
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
  }
  double lim = 10e18 / p;
  double lo = 0, hi = lim * 10, mid, rem, used;
  while (hi - lo > 0.000001) {
    mid = lo + (hi - lo) / 2;
    rem = mid * p;
    for (int i = 0; i < n; i++) {
      used = b[i] - mid * a[i];
      if (used < 0) rem = rem + used;
    }
    if (rem < 0) {
      hi = mid;
    } else
      lo = mid;
    if (lo > lim) {
      cout << -1 << endl;
      return 0;
    }
  }
  cout << setprecision(10) << fixed;
  cout << mid << endl;
  return 0;
}
