#include <bits/stdc++.h>
using namespace std;
bool can(double t, vector<double> &a, vector<double> &b, int p) {
  double reqd = 0;
  for (int i = 0; i < a.size(); i++) {
    reqd += double(max(0.0, t * a[i] - b[i])) / t;
  }
  if (p >= reqd)
    return true;
  else
    return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, p;
  cin >> n >> p;
  vector<double> a(n), b(n);
  long long reqd = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    reqd += a[i];
  }
  if (p >= reqd) {
    cout << -1;
    return 0;
  }
  double l = 0, r = 1e18, ans = 0;
  for (int i = 0; i < 100; i++) {
    double mid = l + (r - l) / 2;
    if (can(mid, a, b, p)) {
      ans = mid;
      l = mid;
    } else
      r = mid;
  }
  cout << setprecision(10) << fixed << ans;
  return 0;
}
