#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, p;
  cin >> n >> p;
  vector<double> a(n), b(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
  }
  double l = 0, r = 1e15;
  for (int k = 0; k < 1000; k++) {
    double t = (l + r) / 2;
    double d = 0;
    for (int i = 0; i < n; i++) {
      if (b[i] / a[i] < t) {
        d += fabs(t * a[i] - b[i]);
      }
    }
    if (d < t * p) {
      l = t;
    } else {
      r = t;
    }
  }
  double t = (l + r) / 2;
  if (t > 1e14) {
    cout << -1 << endl;
  } else {
    printf("%.10lf\n", t);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  solve();
  return 0;
}
