#include <bits/stdc++.h>
using namespace std;
long double a[100009][2];
long double maxi(long double a, long double b) {
  if (a > b)
    return a;
  else
    return b;
}
bool solve(long double mid, int n, long double p) {
  long double req = 0;
  for (int i = 0; i < n; i++) {
    req += maxi(0.00, mid * a[i][0] - a[i][1]);
  }
  if (req > mid * p)
    return false;
  else
    return true;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long double n, p, sum = 0, count = 0, m, flag = 0, ans = 0, k;
  cin >> n >> p;
  long double l = 0, r = 1e10;
  for (int i = 0; i < n; i++) {
    cin >> a[i][0] >> a[i][1];
  }
  while (flag < 1000) {
    long double m = (l + r) / 2;
    if (solve(m, n, p))
      ans = m, l = m;
    else
      r = m;
    flag++;
  }
  if (ans >= 1e10) {
    cout << -1;
    return 0;
  }
  cout << setprecision(8) << ans;
  return 0;
}
