#include <bits/stdc++.h>
using namespace std;
const double inf = 1e15;
const double eps = 0.00001;
vector<int> a, b;
int n, p, i;
bool check(double mid) {
  double res = 0.;
  for (int i = 0; i < n; i++) {
    double cur = (1.) * b[i] - (1.) * mid * a[i];
    if (cur < 0) res += -cur;
  }
  if (mid * p < res)
    return false;
  else
    return true;
}
double bin() {
  double l = 0, r = inf;
  while (r - l > eps) {
    double mid = (l + r) / 2;
    if (check(mid))
      l = mid;
    else
      r = mid;
  }
  return l;
}
int main() {
  long long sum = 0;
  ios_base::sync_with_stdio(false);
  cin >> n >> p;
  a.resize(n);
  b.resize(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    sum += a[i];
  }
  if (sum <= p) {
    cout << -1;
    return 0;
  }
  double ans = bin();
  if (ans > 1e14)
    cout << -1;
  else
    cout << fixed << setprecision(9) << ans + eps / 2;
  return 0;
}
