#include <bits/stdc++.h>
const int MAXN = 1e5 + 5;
const long long INF = 1e12 + 5;
int n, p;
int a[MAXN], b[MAXN];
bool C(double x) {
  double tot = 0.0;
  for (int i = 0; i < n; ++i) {
    if (b[i] - a[i] * x <= 0) tot += a[i] * x - b[i];
  }
  return tot <= x * p;
}
int main() {
  scanf("%d%d", &n, &p);
  long long suma = 0;
  for (int i = 0; i < n; ++i) {
    scanf("%d%d", a + i, b + i);
    suma += a[i];
  }
  if (suma <= p) {
    printf("-1\n");
    return 0;
  }
  double lo = 0.0, hi = 1.0 * INF;
  for (int i = 0; i < 300; ++i) {
    double mid = (hi + lo) / 2.0;
    if (C(mid))
      lo = mid;
    else
      hi = mid;
  }
  printf("%.8lf\n", lo);
}
