#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, p;
  scanf("%d %d ", &n, &p);
  vector<int> a(n), b(n);
  for (int i = 0; i < (int)(n); i++) scanf("%d %d ", &a[i], &b[i]);
  double mn = 0.0, mx = 1e10;
  while (mx - mn > 1e-6) {
    double mid = (mn + mx) / 2.0;
    double charge = mid * p;
    bool ok = true;
    for (int i = 0; i < (int)(n); i++) {
      double time = b[i] / (double)a[i];
      if (time < mid) {
        double timeToCharge = mid - time;
        double requiredPower = timeToCharge * a[i];
        charge -= requiredPower;
        if (charge < 0.0) {
          ok = false;
          break;
        }
      }
    }
    if (ok) {
      mn = mid;
    } else {
      mx = mid;
    }
  }
  if (mx == 1e10) {
    printf("-1\n");
  } else {
    printf("%.8lf\n", (mx + mn) / 2.0);
  }
}
int main() {
  solve();
  return 0;
}
