#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
long long n, p, sum;
long double l, r, mid;
struct data {
  int f, s;
} a[N];
char f(double k) {
  double sum = 0;
  for (int i = 1; i <= n; ++i) {
    if (a[i].s < a[i].f * k) sum += a[i].f * k - a[i].s;
  }
  if (sum > p * k)
    return false;
  else
    return true;
}
int main() {
  cin >> n >> p;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i].f >> a[i].s;
    sum += a[i].f;
  }
  if (sum <= p) return cout << -1, 0;
  l = 0;
  r = 1e18;
  while (r - l > 0.000000001) {
    mid = (l + r) / 2;
    if (f(mid))
      l = mid;
    else
      r = mid;
  }
  cout.precision(10);
  if (f(l))
    cout << fixed << l;
  else
    cout << fixed << r;
}
