#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
const int N = 1e5 + 10;
const int mod = 1e9 + 7;
double a[N], b[N];
int sum(double time, int n, int p) {
  double ans = 0;
  for (int i = 1; i <= n; i++) ans += min(b[i] - time * a[i], (double)0);
  ans = fabs(ans);
  if (ans == time * p)
    return 0;
  else if (ans > time * p)
    return -1;
  else
    return 1;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  double p;
  cin >> n >> p;
  double sum1 = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i] >> b[i];
    sum1 += a[i];
  }
  if (p >= sum1) {
    cout << -1 << endl;
    return 0;
  }
  double l = 0, h = 1e18 + 18;
  double diff = 1e-5;
  double mid;
  while (h - l > diff) {
    mid = (l + h + diff) / 2;
    if (sum(mid, n, p) == 0) {
      if (sum(mid + diff, n, p) == -1)
        break;
      else
        l = mid + diff;
    } else if (sum(mid, n, p) < 0)
      h = mid - diff;
    else
      l = mid + diff;
  }
  if (l == 1e18 + 8) l = -1;
  cout << l << endl;
  return 0;
}
