#include <bits/stdc++.h>
using namespace std;
int n;
long double p, a[100100], b[100100], sum;
bool check(long double time) {
  sum = 0;
  for (int i = 1; i <= n; i++)
    sum += (a[i] * time >= b[i] ? a[i] * time - b[i] : 0);
  return (sum <= (time * p));
}
int main() {
  cin >> n >> p;
  for (int i = 1; i <= n; i++) cin >> a[i] >> b[i], sum += a[i];
  if (sum <= p) return cout << -1, 0;
  long double st = 0, dr = 1e20 + 1, piv;
  for (int i = 1; i <= 200; i++) {
    piv = (st + dr) / 2;
    if (check(piv))
      st = piv;
    else
      dr = piv;
  }
  cout << fixed << setprecision(10) << dr;
  return 0;
}
