#include <bits/stdc++.h>
using namespace std;
double E = 1e-6;
unsigned long long a[100100], b[100100];
int n, p;
double ax, bx, tengah;
double ans(double m) {
  double jawab = 0;
  for (int i = 0; i < n; i++) {
    ax = (double)a[i];
    bx = (double)b[i];
    if (bx < ax * m) {
      jawab += (ax * m - bx);
    }
  }
  return jawab / (p);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> p;
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
  }
  double kiri = 0, kanan = 1e14;
  for (int i = 0; i < 200; i++) {
    tengah = (kiri + kanan) / 2;
    if (ans(tengah) > tengah) {
      kanan = tengah;
    }
    if (ans(tengah) <= tengah) {
      kiri = tengah;
    }
  }
  if (tengah >= 5e13) {
    cout << -1 << endl;
  } else {
    cout << fixed << setprecision(10) << tengah << endl;
  }
}
