#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, p;
  cin >> n >> p;
  vector<long long> A(n, 0);
  vector<long long> B(n, 0);
  for (int i = 0; i < n; i++) {
    cin >> A[i] >> B[i];
  }
  long long z = 0;
  for (int i = 0; i < n; i++) {
    z += A[i];
  }
  if (z <= p) {
    cout << -1;
    return 0;
  }
  double mm = 0;
  double l = 0;
  double r = 1000000000000;
  double m;
  double tt = 0;
  while ((r - l) > 0.000001) {
    m = (r + l) / 2;
    tt = m * p;
    double omg = 0;
    for (int i = 0; i < n; i++) {
      if (m * A[i] - B[i] > 0) omg += m * A[i] - B[i];
    }
    if (omg >= tt) {
      r = m;
    } else
      l = m;
  }
  printf("%.8lf", l);
}
