#include <bits/stdc++.h>
using namespace std;
long long n, p, drain;
double cp;
vector<long long> a, b;
const double EPS = 1e-4;
inline bool check(double k) {
  double r = 0;
  for (int i = 0; i < n; i++) {
    double t = (k * a[i] - b[i]) / p;
    if (t > 0) r += t;
  }
  return (r < k);
}
int main() {
  ios::sync_with_stdio(0);
  cout.precision(10);
  cin >> n >> p;
  cp = p;
  a.resize(n);
  b.resize(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    drain += a[i];
  }
  if (p >= drain) {
    cout << -1 << endl;
    return 0;
  }
  double l = 0, r = 1e11;
  while (r - l > EPS) {
    double m = (r + l) / 2;
    if (check(m))
      l = m;
    else
      r = m;
  }
  cout << fixed << (l + r) / 2 << endl;
}
