#include <bits/stdc++.h>
using namespace std;
int main() {
  cout << fixed << setprecision(12);
  long long n, p;
  cin >> n >> p;
  long long a[n];
  long long b[n];
  long long cnt = 0;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    cin >> b[i];
    cnt += a[i];
  }
  if (cnt <= p) {
    cout << -1 << endl;
    return 0;
  }
  long double l = 0.0;
  long double r = 10000000000.0;
  while (r - l > 0.0000001) {
    long double mid = (l + r) / 2;
    long double sum = 0;
    for (long long i = 0; i < n; i++) {
      long double t1 = (long double)a[i];
      long double t2 = (long double)b[i];
      long double t3 = t2 - (mid)*t1;
      sum += min((long double)0.0, t3);
    }
    sum = 0.0 - sum;
    if (sum < ((long double)p * mid)) {
      l = mid;
    } else {
      r = mid;
    }
  }
  cout << l << endl;
}
