#include <bits/stdc++.h>
using namespace std;
int p, n, a[100100], b[100100];
bool ok(double t) {
  double charging = t * p;
  for (int i = 0; i < n; ++i) {
    double x = b[i] - a[i] * t;
    if (x >= 0)
      continue;
    else
      charging += x;
    if (charging < 0) return 0;
  }
  return 1;
}
int main() {
  cin >> n >> p;
  for (int i = 0; i < n; ++i) cin >> a[i] >> b[i];
  double low = 0, high = 1e11, tol = 1e-7, mid;
  while (high - low > tol) {
    mid = (high + low) / 2;
    if (ok(mid))
      low = mid;
    else
      high = mid;
  }
  if (low < 9.9e10)
    cout << setprecision(10) << fixed << mid;
  else
    cout << -1;
}
