#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  scanf("%d", &N);
  int P;
  scanf("%d", &P);
  vector<int> As, Bs;
  long long SA = 0, SB = 0;
  for (decltype(N) _i = 0, _n = (N); _i < _n; _i++) {
    int A;
    scanf("%d", &A);
    int B;
    scanf("%d", &B);
    As.push_back(A);
    Bs.push_back(B);
    SA += A;
    SB += B;
  }
  auto check = [&](double t) {
    double tmp = 0.0;
    for (decltype(N) i = 0, _n = (N); i < _n; i++) {
      tmp += max(As[i] * t - Bs[i], 0.0) / P;
    }
    return tmp <= t;
  };
  if (SA <= P) {
    printf("-1\n");
  } else {
    double l = 0.0, r = SB * 2.0;
    int cnt = 0;
    while (1e-10 < (r - l) and cnt < 1000) {
      cnt++;
      double c = (l + r) / 2;
      if (check(c)) {
        l = c;
      } else {
        r = c;
      }
    }
    printf("%f", l);
  }
  return 0;
}
