#include <bits/stdc++.h>
using namespace std;
const long long int maxn = 1e5 + 4;
const long double maxv = 1e18;
long long int a[maxn], b[maxn], p;
long double exhaust[maxn];
int n;
bool f(long double imid) {
  long double needsum = 0;
  for (int i = 0; i <= n - 1; i += 1) {
    long double need = max(0.0l, (imid - exhaust[i]) * a[i]);
    needsum += need;
  }
  long double supply = imid * p;
  return supply >= needsum;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  cin >> n >> p;
  for (int i = 0; i <= n - 1; i += 1) cin >> a[i] >> b[i];
  long long int suma = 0;
  for (int i = 0; i <= n - 1; i += 1) suma += a[i];
  if (p >= suma) {
    cout << -1;
    return 0;
  }
  for (int i = 0; i <= n - 1; i += 1)
    exhaust[i] = (long double)b[i] / (long double)a[i];
  long double imin = 0, imax = maxv;
  for (long long int iter = 0; iter < 220; iter++) {
    long double imid = (imin + imax) / 2;
    if (f(imid))
      imin = imid;
    else
      imax = imid;
  }
  if (imax > maxv - 100)
    cout << -1;
  else
    cout << fixed << setprecision(4) << (double)imin;
  return 0;
}
