#include <bits/stdc++.h>
using namespace std;
const int M = 1e5 + 10;
double a[M], b[M];
int main() {
  int n;
  double p;
  scanf("%d%lf", &n, &p);
  double sum = 0;
  for (int i = 0; i < n; i++) {
    scanf("%lf%lf", &a[i], &b[i]);
    sum += a[i];
  }
  if (sum <= p) {
    cout << -1 << endl;
  } else {
    double l = 0, r = 1e10;
    double mid = (l + r) / 2;
    for (int j = 1; j <= 300; j++) {
      mid = (l + r) / 2;
      double need = 0;
      for (int i = 0; i < n; i++) {
        need += max(0.0, 1.0 * a[i] - b[i] / mid);
      }
      if (need <= p)
        l = mid;
      else
        r = mid;
    }
    printf("%.10lf\n", l);
  }
  return 0;
}
