#include <bits/stdc++.h>
using namespace std;
long double a[1000000];
long double b[1000000];
int main() {
  long double n, p;
  cin >> n >> p;
  long double saving = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    cin >> b[i];
    saving += a[i];
  }
  if (saving <= p) {
    cout << -1 << endl;
  } else {
    long double l = 0, mid = 0, r = 1e14;
    while (r - l >= 0.00001) {
      mid = l + ((r - l) / 2);
      long double run = 0.0;
      for (int i = 0; i < n; i++) {
        long double x;
        if (a[i] * mid - b[i] >= 0.0) {
          x = a[i] * mid - b[i];
        } else {
          x = 0.0;
        }
        run += x;
      }
      if (run < (p * mid)) {
        l = mid;
      }
      if (run > (p * mid)) {
        r = mid;
      }
      if (run == (p * mid)) {
        break;
      }
    }
    cout << mid << endl;
  }
}
