#include <bits/stdc++.h>
using namespace std;
int n, p;
int a[100010], b[100010];
bool solve(double v) {
  double tmp[100010];
  for (int i = 0; i < n; i++) {
    tmp[i] = (double)b[i] - v * (double)a[i];
  }
  double sum = 0;
  for (int i = 0; i < n; i++) {
    if (tmp[i] < 0) sum -= tmp[i];
  }
  if ((double)p * v > sum) return true;
  return false;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> p;
  long long sum = 0;
  for (int i = 0; i < n; i++) cin >> a[i] >> b[i];
  for (int i = 0; i < n; i++) sum += a[i];
  if (sum <= p) {
    cout << -1 << endl;
    exit(0);
  }
  double lo = 0, hi = 1e18;
  int cnt = 0;
  while (cnt++ < 80) {
    double mi = (lo + hi) / 2;
    if (solve(mi))
      lo = mi;
    else
      hi = mi;
  }
  if (abs(lo - 1e18) < 1e7)
    cout << -1 << endl;
  else
    cout << fixed << setprecision(12) << lo << endl;
  return 0;
}
