#include <bits/stdc++.h>
using namespace std;
long long a[100100], b[100100], n, p;
int main() {
  cin >> n >> p;
  long long charge = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    cin >> b[i];
    charge += a[i];
  }
  if (charge <= p) {
    cout << "-1\n";
    return 0;
  }
  long long cnt = 0;
  double hi = 1e10 + 10, lo = 0, mid;
  while (cnt < 100) {
    cnt++;
    mid = (hi + lo) / 2;
    double x = 0;
    for (long long i = 0; i < n; i++) {
      double temp = (a[i] * mid) - b[i];
      if (temp <= 0) {
        temp = 0;
      }
      x += temp;
    }
    if (x > p * mid) {
      hi = mid;
    } else {
      lo = mid;
    }
  }
  printf("%.8lf\n", lo);
  return 0;
}
