#include <bits/stdc++.h>
using namespace std;
const int Nmax = 1e6 + 7;
const double eps = 1e-6;
const double INF = 1e12 * 1.0;
int sgn(double x) {
  if (x > eps) return 1;
  if (x < -eps) return -1;
  return 0;
}
struct node {
  double v, p;
} a[Nmax];
int n, p;
int check(double t) {
  double rest = t * p;
  for (int i = 1; i <= n; i++) {
    double k = a[i].v * t;
    if (a[i].p - k >= eps) continue;
    rest -= k - a[i].p;
    if (sgn(rest) < 0) return 0;
  }
  if (sgn(rest) < 0) return 0;
  return 1;
}
double rest = 0.0;
int main() {
  scanf("%d%d", &n, &p);
  for (int i = 1; i <= n; i++) {
    scanf("%lf%lf", &a[i].v, &a[i].p);
    rest += a[i].v;
  }
  if (p >= rest) {
    printf("-1\n");
    return 0;
  }
  double l = 0.0, r = INF;
  int t = 0;
  while (l < r) {
    t++;
    if (t > 60) break;
    double mid = (l + r) / 2.0;
    if (!check(mid))
      r = mid - eps;
    else
      l = mid + eps;
  }
  printf("%.5lf\n", l);
  return 0;
}
