#include <bits/stdc++.h>
using namespace std;
const double ce = 1e-5;
const double INF = 1e12;
int a[100005], b[100005];
int n, p;
bool check(double x) {
  double f;
  f = x * p;
  double s;
  for (int i = 1; i <= n; i++) {
    s = b[i] - a[i] * x;
    if (s < 0) f += s;
    if (f < 0) return false;
  }
  return true;
}
int main() {
  scanf("%d%d", &n, &p);
  long long sum = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &a[i], &b[i]);
    sum += a[i];
  }
  if (sum <= p) {
    printf("-1\n");
    return 0;
  }
  double l = 0, r = INF;
  while ((r - l) > ce) {
    double mid = (l + r) / 2.0;
    if (check(mid))
      l = mid;
    else
      r = mid;
  }
  printf("%.10lf\n", r);
  return 0;
}
