#include <bits/stdc++.h>
using namespace std;
const double inf = 1e12;
int n;
double p;
double a[100100], b[100100];
bool solve(double t) {
  double pp = p * t;
  for (int i = 0; i < n; i++) {
    double cur = b[i] - t * a[i];
    if (cur < 0.0) pp += cur;
  }
  return pp > 0.0;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> p;
  double s = 0.0;
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    s += a[i];
  }
  if (p > s - 1e-6) {
    cout << -1 << endl;
    return 0;
  }
  double l = 0, r = inf;
  while (r - l > 1e-6) {
    double c = (r + l) / 2.;
    if (solve(c))
      l = c;
    else
      r = c;
  }
  cout << setprecision(10) << l << endl;
  return 0;
}
