#include <bits/stdc++.h>
using namespace std;
pair<int, int> x[100010];
double ans = 0, l = 0, r = 1e18, mid;
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  double p;
  long long sum = 0;
  cin >> n >> p;
  for (int i = 0; i < n; i++) {
    cin >> x[i].first >> x[i].second;
    sum += 1LL * x[i].first;
  }
  if (sum <= p) {
    cout << -1 << endl;
    return 0;
  }
  while (r - l > 1e-6) {
    mid = 0.5 * (l + r);
    double cnt = 0;
    for (int i = 0; i < n; i++)
      cnt +=
          max(0.0, 1.0 * x[i].first * (mid - 1.0 * x[i].second / x[i].first));
    if (cnt <= mid * p)
      l = mid;
    else
      r = mid;
  }
  cout << mid << endl;
}
