#include <bits/stdc++.h>
using namespace std;
long long n, p;
long long a[100001], b[100001];
signed main() {
  cin >> n >> p;
  long long sum = 0;
  for (long long i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    sum += a[i];
  }
  if (sum <= p) {
    cout << -1;
    return 0;
  }
  long double l = 0, r = 1e18;
  for (long long i = 0; i < 200; i++) {
    long double mid = (l + r) / 2;
    long double sum = 0;
    for (long long j = 0; j < n; j++) {
      long double cnt = mid * a[j];
      long double need = cnt - b[j];
      if (need < 1e-15) continue;
      sum += need;
    }
    if (sum <= mid * p) {
      l = mid;
    } else {
      r = mid;
    }
  }
  cout << fixed << setprecision(8) << l;
  return 0;
}
