#include <bits/stdc++.h>
using namespace std;
double a[100005];
double b[100005];
double p;
int n;
bool cek(double waktu) {
  bool bisa = true;
  double temp = 0.0;
  double waktus = 1e18;
  for (int i = 1; i <= n; i++) {
    double butuh = waktu * a[i];
    if (b[i] >= butuh) {
      min(waktus, b[i] - butuh);
    } else if (b[i] < butuh) {
      temp += (butuh - b[i]) / p;
    }
  }
  if (temp > waktu)
    return false;
  else
    return true;
}
int main() {
  cin >> n >> p;
  for (int i = 1; i <= n; i++) {
    cin >> a[i] >> b[i];
  }
  double kiri = 0.0;
  double kanan = 1e18;
  double tengah;
  double ans = 0.0;
  for (int i = 1; i < 100; i++) {
    tengah = (kanan + kiri) / 2;
    if (cek(tengah)) {
      kiri = tengah;
      ans = max(ans, tengah);
    } else {
      kanan = tengah;
    }
  }
  if (ans > 1e17)
    cout << -1 << endl;
  else
    cout << fixed << setprecision(5) << ans << endl;
}
