#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N, P, s = 0, i;
  cin >> N >> P;
  long long a[N + 1], b[N + 1];
  for (i = 1; i <= N; i++) {
    cin >> a[i] >> b[i];
    s += a[i];
  }
  if (s <= P) {
    cout << -1;
    return 0;
  }
  long double l = 0, r = 1e18;
  while (r - l > 1e-7) {
    long double mid = (l + r) / 2;
    long double x = mid * P;
    for (i = 1; i <= N; i++) {
      long double t = b[i] * 1.0 / a[i];
      if (t < mid) x -= (mid - t) * a[i];
      if (x < 0) break;
    }
    if (i > N)
      l = mid;
    else
      r = mid;
  }
  cout << setprecision(18) << fixed << l;
}
