#include <bits/stdc++.h>
using namespace std;
long long n, p, a[100005], b[100005];
double eps = 1e-6;
int main() {
  iostream::sync_with_stdio(0);
  cin >> n >> p;
  long long tmp = 0;
  for (int i = 1; i <= n; i++) cin >> a[i] >> b[i], tmp += a[i];
  if (p >= tmp) {
    cout << -1;
    return 0;
  }
  double L = 0, R = 1e11;
  for (int t = 1; t <= 300; t++) {
    double mid = (L + R) / 2;
    double power = 0;
    for (int i = 1; i <= n; i++)
      power += max(0.0, 1.0 * a[i] - 1.0 * b[i] / mid);
    if (power < 1.0 * p + eps)
      L = mid;
    else
      R = mid;
  }
  cout << setprecision(10) << L;
}
