#include <bits/stdc++.h>
using namespace std;
int n, p;
struct info {
  int a, b;
} arra[100000 + 6];
double fun(double time) {
  int i;
  double sum = 0.0;
  double total = (double)p * (double)time;
  for (i = 0; i < n; i++) {
    sum = (double)((double)arra[i].b - ((double)arra[i].a * (double)time));
    if (sum < 0) {
      if (total + sum > 0) {
        total = total + sum;
      } else {
        return -1;
      }
    }
  }
  return 1;
}
int main() {
  int i, j, k, t;
  scanf("%d %d", &n, &p);
  for (i = 0; i < n; i++) {
    scanf("%d %d", &arra[i].a, &arra[i].b);
  }
  double lo, mid, hig;
  lo = 0.0;
  hig = 10000000000.00;
  double ans;
  if (fun(hig) >= 0) {
    cout << "-1" << endl;
    return 0;
  }
  while (fabs(hig - lo) > .000001) {
    mid = (lo + hig) / 2.00;
    double sum;
    sum = fun(mid);
    if (sum >= 0) {
      ans = mid;
      lo = mid;
    } else {
      hig = mid;
    }
  }
  printf("%.4f\n", ans);
}
