#include <bits/stdc++.h>
using namespace std;
class C_ {};
template <typename T>
C_& operator<<(C_& __m, const T& __s) {
  if (!1) cerr << "\E[91m" << __s << "\E[0m";
  return __m;
}
C_ merr;
struct __s {
  __s() {
    if (1) {
      ios_base::Init i;
      cin.sync_with_stdio(0);
      cin.tie(0);
    }
  }
  ~__s() {
    merr << "Execution time: " << (double)clock() / CLOCKS_PER_SEC << " s.\n";
  }
} __S;
unsigned long long A[111111];
unsigned long long B[111111];
int main(void) {
  unsigned long long n, p;
  cin >> n >> p;
  for (unsigned long long i = 0; i < n; i++) {
    cin >> A[i] >> B[i];
  }
  double ll = 0, rr = 1e20;
  for (unsigned long long tt = 0; tt < 555; tt++) {
    double mm = (ll + rr) / 2;
    double sum = 0;
    for (unsigned long long i = 0; i < n; i++) {
      sum += max(0.0, A[i] - B[i] / mm);
    }
    if (sum > p) {
      rr = mm;
    } else {
      ll = mm;
    }
  }
  if (ll > 1e19) {
    cout << "-1" << '\n';
  } else {
    cout << fixed << setprecision(10) << ll << '\n';
  }
  return 0;
}
