#include <bits/stdc++.h>
using namespace std;
bool debug = 0;
int n, m, k;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
string direc = "RDLU";
long long ln, lk, lm;
void etp(bool f = 0) {
  puts(f ? "YES" : "NO");
  exit(0);
}
void addmod(int &x, int y, int mod = 1000000007) {
  x += y;
  if (x >= mod) x -= mod;
  assert(x >= 0 && x < mod);
}
void et() {
  puts("-1");
  exit(0);
}
int a[100005], b[100005], p;
long long sa;
bool ck(long double t) {
  long double st = 0;
  for (int(i) = 1; (i) <= (int)(n); (i)++) {
    st += max(a[i] * t - b[i], 0.0l) / p;
  }
  return st <= t;
}
void fmain(int tid) {
  scanf("%d%d", &n, &p);
  for (int(i) = 1; (i) <= (int)(n); (i)++) {
    scanf("%d%d", a + i, b + i);
    sa += a[i];
  }
  if (sa <= p) et();
  long double l = 0, r = 1e18;
  while (fabs(l - r) > 1e-9) {
    long double mid = (l + r) / 2;
    if (ck(mid))
      l = mid;
    else
      r = mid;
  }
  printf("%.10Lf\n", l);
}
int main() {
  int t = 1;
  for (int(i) = 1; (i) <= (int)(t); (i)++) {
    fmain(i);
  }
  return 0;
}
