#include <bits/stdc++.h>
using namespace std;
const int maxn = 1 << 20;
const double eps = 1e-4;
long long n, p;
long long A[maxn], B[maxn];
double fabs(double x) {
  if (x < 0)
    return -x;
  else
    return x;
}
bool judge(double t) {
  double ct = 0.0;
  double sum = 0.0;
  for (int i = 0; i < n; ++i) {
    ct = t * A[i] - B[i];
    if (ct < 0) continue;
    ct /= p;
    sum += ct;
    if (ct > t) return false;
  }
  if (sum > t)
    return false;
  else
    return true;
}
double solve() {
  double l, r, m;
  double ret = 0.0;
  bool ok;
  l = 0, r = 1e15;
  while (fabs(r - l) > eps) {
    m = (l + r) / 2;
    ok = judge(m);
    if (ok) {
      l = m;
      ret = max(m, ret);
    } else {
      r = m;
    }
  }
  return ret;
}
int main() {
  while (cin >> n >> p) {
    long long sum = 0;
    for (int i = 0; i < n; ++i) {
      cin >> A[i] >> B[i];
      sum += A[i];
    }
    if (sum <= p) {
      cout << "-1" << endl;
    } else {
      printf("%.10lf\n", solve());
    }
  }
  return 0;
}
