#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  double p, sum = 0;
  cin >> n >> p;
  vector<long long> a(n), b(n);
  for (int i = 0; i < n; i++) cin >> a[i], sum += a[i], cin >> b[i];
  if (sum <= p) {
    cout << -1 << "\n";
    return;
  }
  double l = 0, r = 1e13, ans = 0;
  while (abs(r - l) > 1e-9) {
    double mid = (l + r) / 2.0, tot = 0;
    for (int i = 0; i < n; i++) {
      tot += max(a[i] * mid - b[i], 0.0) / mid;
    }
    if (tot <= p)
      ans = mid, l = mid;
    else
      r = mid;
  }
  cout << fixed << setprecision(10);
  ;
  cout << ans << "\n";
}
int main() {
  solve();
  return 0;
}
