#include <bits/stdc++.h>
const int INF = 0x3f3f3f3f;
const int maxn = 1e5 + 50;
const int mod = 1e9 + 7;
const double eps = 1e-8;
using namespace std;
int n;
int p;
int a[maxn], b[maxn];
double calPower(double t) {
  double tot = t * p;
  for (int i = 0; i < n; i++) {
    double tmp = b[i] - a[i] * t;
    if (tmp < 0) tot += tmp;
  }
  return tot;
}
int main() {
  while (~scanf("%d %d", &n, &p)) {
    long long tot = 0;
    for (int i = 0; i < n; i++) {
      scanf("%d %d", &a[i], &b[i]);
      tot += a[i];
    }
    if (p >= tot) {
      puts("-1");
      continue;
    }
    double tl = 0, tr = 1e18;
    for (int i = 0; i < 500; i++) {
      double mid = (tr + tl) / 2;
      double tmp = calPower(mid);
      if (tmp > 0)
        tl = mid;
      else
        tr = mid;
    }
    printf("%.8lf\n", tl);
  }
  return 0;
}
