#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-6;
struct node {
  int a, b;
  double t;
} r[100100];
int cmp(node m, node n) {
  if (fabs(m.t - n.t) <= eps) return m.a > n.a;
  return m.t < n.t;
}
int n;
long long p;
int work(double k) {
  double now = 0;
  for (int i = 1; i <= n; i++) {
    if (k <= r[i].t)
      ;
    else {
      now += (k - r[i].t) * r[i].a / p;
    }
  }
  return now <= k;
}
int main() {
  cin >> n >> p;
  long long sum = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &r[i].a, &r[i].b);
    r[i].t = (double)r[i].b / (double)r[i].a;
    sum += r[i].a;
  }
  if (sum <= p) return 0 * printf("-1\n");
  sort(r + 1, r + 1 + n, cmp);
  double l = 0, r = 1e13;
  while (r - l > eps) {
    double mid = (l + r) / 2;
    if (work(mid))
      l = mid;
    else
      r = mid;
  }
  printf("%.5f\n", l);
}
