#include <bits/stdc++.h>
using namespace std;
struct _ {
  _() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.precision(30);
  }
} __;
const int N = 1e5 + 10;
long long n, p, a[N], b[N];
int main() {
  cin >> n >> p;
  long long sumA = 0, sumB = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    sumA += a[i];
    sumB += b[i];
  }
  if (sumA <= p) {
    cout << -1;
    return 0;
  }
  long double l = 0, r = 1e12, sum = 0;
  for (int tt = 0; tt < 100; tt++) {
    sum = 0;
    long double mid = (l + r) / 2;
    for (int i = 0; i < n; i++) {
      sum += max((long double)0.0, a[i] - b[i] / mid);
    }
    if (sum > p) {
      r = mid;
    } else {
      l = mid;
    }
  }
  cout << l << endl;
  return 0;
}
