#include <bits/stdc++.h>
using namespace std;
template <class TH>
void _dbg(const char *sdbg, TH h) {
  cerr << sdbg << "=" << h << "\n";
}
template <class TH, class... TA>
void _dbg(const char *sdbg, TH h, TA... a) {
  while (*sdbg != ',') cerr << *sdbg++;
  cerr << "=" << h << ",";
  _dbg(sdbg + 1, a...);
}
long long test;
long long n, p;
double a[500007], b[500007];
double l, r, mid;
bool check(double xd) {
  double pom = 0;
  for (long long i = 1; i <= (n); ++i) {
    pom += max(0.0, a[i] * xd - b[i]);
  }
  if (xd * p >= pom)
    return true;
  else
    return false;
}
void solve() {
  cin >> n >> p;
  for (long long i = 1; i <= (n); ++i) {
    cin >> a[i] >> b[i];
  }
  long long kek = 0;
  for (long long i = 1; i <= (n); ++i) {
    kek += a[i];
  }
  if (kek <= p) {
    cout << -1 << '\n';
    return;
  }
  r = 1e18;
  for (long long i = 1; i <= (100); ++i) {
    mid = (l + r) / 2.0;
    if (check(mid)) {
      l = mid;
    } else
      r = mid;
  }
  cout << l;
  return;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.precision(10);
  cout << fixed;
  test = 1;
  while (test--) {
    solve();
  }
  return 0;
}
