#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 100000 + 1000;
const double eps = 1E-4;
double N, P;
double A[MAX_N], B[MAX_N];
bool check(double t) {
  double e = t * P;
  for (int i = 0; i < N; i++) {
    double delta = B[i] - A[i] * t;
    if (delta < 0) e += delta;
    if (e < 0) return false;
  }
  return true;
}
int main() {
  cin.tie(NULL);
  ios::sync_with_stdio(false);
  cin >> N >> P;
  double Amo = 0.0;
  for (int i = 0; i < N; i++) {
    cin >> A[i] >> B[i];
    Amo += A[i];
  }
  if (Amo <= P) {
    cout << "-1" << endl;
    return 0;
  }
  double L = 0.0, R = 1E18;
  while (R - L >= eps) {
    double Mid = (L + R) / 2;
    if (check(Mid))
      L = Mid;
    else
      R = Mid;
  }
  cout << setprecision(4) << std::fixed << (L + R) / 2 << endl;
}
