#include <bits/stdc++.h>
using namespace std;
const int maxn = 100002;
const long long MOD = 1000000007;
int n, p, a[maxn], b[maxn];
double s = 0, L, R;
int main() {
  cin >> n >> p;
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", a + i, b + i);
    s += a[i];
  }
  if (s <= p) return cout << -1, 0;
  L = 0;
  R = 1e10;
  while (L + 0.0001 < R) {
    double mid = (L + R) / 2;
    double Pneed = 0;
    for (int i = 1; i <= n; i++) Pneed += max(a[i] * mid - b[i], (double)0);
    if (Pneed <= p * mid)
      L = mid;
    else
      R = mid;
  }
  cout << setprecision(10) << fixed << L;
  return 0;
}
