#include <bits/stdc++.h>
int N, P;
struct my {
  double a, b;
} A[100100];
int check(double T) {
  double t = 0;
  for (int i = 0; i < N; i++)
    if (A[i].b - A[i].a * T <= 0) t += A[i].a * T - A[i].b;
  return t <= T * P;
}
int main() {
  scanf("%d%d", &N, &P);
  long long sum = 0;
  for (int i = 0; i < N; i++) {
    scanf("%lf%lf", &A[i].a, &A[i].b);
    sum += A[i].a;
  }
  if (sum <= P) {
    printf("-1\n");
    return 0;
  }
  double st = 0, dr = (double)1e17;
  for (int i = 0; i < 1000; i++) {
    double mid = (st + dr) / 2;
    if (check(mid))
      st = mid;
    else
      dr = mid;
  }
  if (st == 1e17) {
    printf("-1\n");
    return 0;
  }
  printf("%.10f\n", st);
  return 0;
}
