#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1e-10;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  long double p;
  cin >> n >> p;
  vector<long double> a(n), b(n);
  long double ss = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    ss += a[i];
  }
  if (p >= ss) {
    cout << -1;
    return 0;
  }
  long double l = 0, r = 2e16 + 7;
  bool was = 0;
  for (int i = 0; i < 100 && r - l > EPS; i++) {
    long double m = (l + r) / 2;
    long double s = 0;
    for (int i = 0; i < n; i++) s += max((long double)0, a[i] * m - b[i]);
    if (p * m >= s)
      l = m;
    else
      r = m, was = 1;
  }
  cout << setprecision(15) << fixed << l;
  return 0;
}
