#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, p;
  cin >> n >> p;
  long long sump = 0;
  long long sumn = 0;
  vector<int> a(n), b(n);
  double l = 0, r = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &a[i], &b[i]);
    sump += a[i];
    sumn += b[i];
  }
  if (sump <= p) {
    cout << -1 << endl;
    return 0;
  }
  double d = sump - p;
  r = sumn / d + 2;
  while (r - l > 0.000001) {
    double m = (l + r) / 2;
    double ans = 0;
    for (int i = 0; i < n; i++) {
      ans += max(0.0, a[i] * m - b[i]);
    }
    if (ans <= p * m) {
      l = m;
    } else {
      r = m;
    }
  }
  cout.precision(10);
  cout << fixed << (l + r) / 2 << endl;
}
