#include <bits/stdc++.h>
using namespace std;
double n, p;
double a[200000], b[200000];
bool check(double mid) {
  double sum = 0;
  for (int i = 0; i < n; i++) {
    double res = mid * (1.0 * a[i]) - (1.0 * b[i]);
    if (res > 0) sum += res;
  }
  if (sum <= mid * p)
    return true;
  else
    return false;
}
long double bs() {
  long double l = 0, r = 1e18, mid;
  for (int i = 0; i < 200; i++) {
    mid = (l + r) / 2;
    if (check(mid)) {
      l = mid + 0.0001;
    } else
      r = mid - 0.0001;
  }
  return mid;
}
int main() {
  cin >> n >> p;
  long long int sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    cin >> b[i];
    sum += a[i];
  }
  long double ans = bs();
  if (sum <= p)
    cout << -1;
  else
    cout << setprecision(4) << fixed << ans << endl;
}
