#include <bits/stdc++.h>
using namespace std;
const double ep = 1e-9;
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  cout << fixed << setprecision(9);
  int n;
  long long p, cost = 0;
  cin >> n >> p;
  vector<long long> a(n), b(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    cost += a[i];
  }
  if (cost <= p)
    cout << -1 << '\n';
  else {
    long double l = 0, r = 1e12, m, x;
    int it = 100;
    while (it--) {
      m = (l + r) / 2;
      x = 0.0;
      for (int i = 0; i < n; i++) {
        if (m * a[i] - b[i] > -ep) {
          x += m * a[i] - b[i];
        }
      }
      if (m * p - x > -ep)
        l = m;
      else
        r = m;
    }
    cout << l << '\n';
  }
}
