#include <bits/stdc++.h>
using namespace std;
int const N = 1e6 + 1;
int md = 1e9 + 7;
int i, j, n, m, t, x, y, k, nom, ans;
int a[N], b[N];
int main() {
  long long s = 0;
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &a[i], &b[i]);
    s += a[i];
  }
  if (s <= k) {
    printf("-1");
    return 0;
  }
  double l = 0, r = 2e12;
  while (r - l > 1e-5) {
    double t = (l + r) / 2;
    double col = t * k;
    for (int i = 1; i <= n; i++) {
      col -= max(0.0, a[i] * t - b[i]);
    }
    if (col < 0)
      r = t;
    else
      l = t;
  }
  printf("%.5f", r);
}
