#include <bits/stdc++.h>
const int MAXN = 1e5 + 5;
const double eps = 0.00001;
int n, p;
int c[MAXN], s[MAXN];
int main() {
  scanf("%d%d", &n, &p);
  long long sum = 0;
  for (int i = 0; i < n; ++i) {
    scanf("%d%d", c + i, s + i);
    sum += c[i];
  }
  if (sum <= p) {
    printf("-1\n");
  } else {
    double lo = 0, hi = 1e18;
    while (hi - lo > eps) {
      double mid = (lo + hi) / 2;
      double cons = 0;
      for (int i = 0; i < n; ++i) {
        double curr = c[i] * mid - s[i];
        if (curr > 0) cons += curr;
      }
      if (cons > p * mid) {
        hi = mid;
      } else {
        lo = mid;
      }
    }
    printf("%lf\n", lo);
  }
  return 0;
}
