#include <bits/stdc++.h>
using namespace std;
long long int n, p;
long double a[100001], b[100001];
bool possible(long double t) {
  long double def = 0.0;
  for (long long int i = 0; i < n; i++) {
    if (a[i] * t > b[i]) {
      def += a[i] * t - b[i];
    }
  }
  return p * t >= def;
}
signed main() {
  cin >> n >> p;
  for (long long int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
  }
  long double low = 0.0, high = 1e10, mid = -1, delta = 0.00001;
  while (low + delta < high) {
    mid = (low + high + delta) / 2.0;
    long long int x = ceil(mid * 1e5);
    mid = (long double)x / 1e5;
    if (possible(mid)) {
      low = mid;
    } else {
      high = mid - delta;
    }
  }
  if (low + delta >= 1e10) {
    cout << -1;
  } else {
    cout << low - delta;
  }
}
