#include <bits/stdc++.h>
using namespace std;
long long a[200000];
long long b[200000];
int main() {
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  int n;
  long long p;
  cin >> n >> p;
  long long s = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    s += a[i];
  }
  if (s <= p) {
    cout << -1 << endl;
    return 0;
  }
  double lo = 0;
  double hi = 1000000000000000.0;
  for (int it = 0; it < 100; it++) {
    double mi = (lo + hi) / 2;
    double T = 0;
    for (int i = 0; i < n; i++) {
      double z = (b[i] - a[i] * mi);
      if (z < 0) {
        T -= z / p;
      }
    }
    if (T <= mi) {
      lo = mi;
    } else {
      hi = mi;
    }
  }
  cout << lo << endl;
  return 0;
}
