#include <bits/stdc++.h>
using namespace std;
int n;
long long p;
long long a[100005], b[100005];
bool C(double t) {
  double ss = 0;
  for (int i = 0; i < (n); i++) {
    double aa = a[i] * t, bb = b[i];
    if (bb - aa >= 0)
      continue;
    else
      ss += aa - bb;
  }
  double pp = p * t;
  if (pp - ss >= 0) return true;
  return false;
}
int main(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(false);
  cin >> n >> p;
  for (int i = 0; i < (n); i++) {
    cin >> a[i] >> b[i];
  }
  double l = 0, r = 10000000000;
  for (int i = 0; i < (100); i++) {
    double mid = (l + r) / 2;
    if (C(mid))
      l = mid;
    else
      r = mid;
  }
  if (r == 10000000000)
    cout << -1 << endl;
  else
    cout << setprecision(10) << r << endl;
  return 0;
}
