#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 1e5 + 4;
const long double MAXV = 1e18;
long long a[MAXN], b[MAXN];
long double exhaust[MAXN];
int n;
long long P;
bool f(long double imid) {
  long double needsum = 0;
  for (int i = 0; i < n; i++) {
    long double need = max(0.0L, (imid - exhaust[i]) * a[i]);
    needsum += need;
  }
  long double supply = imid * P;
  return supply >= needsum;
}
int main() {
  scanf("%d%lld", &n, &P);
  for (int i = 0; i < n; i++) {
    scanf("%lld%lld", &a[i], &b[i]);
  }
  long long suma = 0;
  for (int i = 0; i < n; i++) {
    suma += a[i];
  }
  if (P >= suma) {
    printf("-1\n");
    return 0;
  }
  for (int i = 0; i < n; i++) {
    exhaust[i] = ((long double)b[i]) / ((long double)a[i]);
  }
  long double imin = 0, imax = MAXV;
  for (long long iter = 0; iter < 220; iter++) {
    long double imid = (imin + imax) / 2;
    if (f(imid))
      imin = imid;
    else
      imax = imid;
  }
  if (imax > MAXV - 100)
    printf("-1\n");
  else
    printf("%.9f\n", (double)imin);
}
