#include <bits/stdc++.h>
struct P {
  long long a, b;
} pp[100000];
int compare(const void *a, const void *b) {
  struct P *pa = (struct P *)a;
  struct P *pb = (struct P *)b;
  long long x = pa->b * pb->a;
  long long y = pb->b * pa->a;
  return x == y ? 0 : (x < y ? -1 : 1);
}
int main() {
  long long sum, sum1, sum2, p;
  int n, i;
  scanf("%d%lld", &n, &p);
  sum = 0;
  for (i = 0; i < n; i++) {
    scanf("%lld%lld", &pp[i].a, &pp[i].b);
    sum += pp[i].a;
  }
  if (p >= sum)
    printf("-1\n");
  else {
    qsort(pp, n, sizeof *pp, compare);
    sum1 = sum2 = 0;
    for (i = 0; i < n; i++) {
      long long x, y;
      x = (long long)sum2 * pp[i].a;
      y = (long long)(sum1 - p) * pp[i].b;
      if (x <= y) break;
      sum1 += pp[i].a;
      sum2 += pp[i].b;
    }
    printf("%.12lf\n", (double)sum2 / (sum1 - p));
  }
  return 0;
}
