#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p;
  cin >> n >> p;
  vector<int> a(n), b(n);
  long long p1 = 0;
  double r = 1e10 + 5;
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    p1 += a[i];
  }
  if (p >= p1) {
    cout << -1;
    return 0;
  }
  double l = 0;
  double lm = 0;
  while (std::abs(r - l) > 0.00001) {
    double m = l + (r - l) / 2;
    double pw = 0;
    for (int i = 0; i < n; i++) {
      pw += std::max(0.0, double(a[i]) - double(b[i]) / m);
    }
    if (p > pw)
      l = m;
    else if (p < pw)
      r = m;
    else {
      cout << m;
      return 0;
    }
    if (std::abs(m - lm) / max(m, lm) < 0.0001) break;
    lm = m;
  }
  cout << l;
  return 0;
}
