#include <bits/stdc++.h>
using namespace std;
long long t = 1;
bool check(long double mid, long long n, long long p, vector<long long>& a,
           vector<long long>& b) {
  long double e = 0;
  for (long long i = 1; i < n + 1; i += 1) {
    e += max((long double)0, mid * a[i] - b[i]);
  }
  return e <= p * mid;
}
long double bnsr(long long n, long long p, vector<long long>& a,
                 vector<long long>& b) {
  long double lo = 0, hi = 1e11, mid;
  if (check(hi, n, p, a, b)) return -1;
  while (hi - lo > 1e-5) {
    mid = (hi + lo) / 2.0;
    if (check(mid, n, p, a, b))
      lo = mid;
    else
      hi = mid;
  }
  return (hi == 1e11 && hi - lo <= 1e-5) ? -1 : lo;
}
void solve() {
  long long n, p;
  cin >> n >> p;
  vector<long long> a(n + 1), b(n + 1);
  for (long long i = 1; i < n + 1; i += 1) cin >> a[i] >> b[i];
  cout << setprecision(15) << bnsr(n, p, a, b);
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  while (t--) solve();
  return 0;
}
