#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p;
  cin >> n >> p;
  int aa[100001], bb[100001];
  long double cn = 0;
  for (int i = 0; i < n; i++) {
    cin >> aa[i] >> bb[i];
    cn += (long double)aa[i];
  }
  if (cn <= p) {
    cout << "-1\n";
    return 0;
  }
  long double ll = 0.0, ul = 1e18;
  for (int i = 0; i < 100; i++) {
    long double m = (ll + ul) / 2.0;
    long double v = 0.0;
    for (int j = 0; j < n; j++) {
      v += max(0.0L, m * (long double)aa[j] - (long double)bb[j]);
    }
    if (v <= p * m) {
      ll = m;
    } else {
      ul = m;
    }
  }
  cout.precision(30);
  cout << ul << '\n';
  return 0;
}
