#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T sqr(const T& x) {
  return x * x;
}
template <class T>
inline void updMin(T& a, const T& b) {
  if (b < a) a = b;
}
template <class T>
inline void updMax(T& a, const T& b) {
  if (b > a) a = b;
}
int n;
int p;
int a[1000000], b[1000000];
int pp[1000000];
bool check(double t) {
  double t_charged = 0;
  for (int ii = 0; ii < n; ii++) {
    int i = pp[ii];
    double t0 = b[i] * 1.0 / a[i];
    if (t0 > t) continue;
    double t_need = a[i] * (t - t0) / p;
    if (t_charged + t_need > t) {
      return 0;
    }
    t_charged += t_need;
  }
  return 1;
}
bool cmp(int aa, int bb) { return a[aa] < a[bb]; }
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> p;
  bool ok = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    pp[i] = i;
  }
  sort(pp, pp + n, cmp);
  for (int ii = 0; ii < n; ii++) {
  }
  double l = 0, r = 1e11;
  for (int i = 0; i < 1000; i++) {
    double m = (l + r) / 2;
    if (check(m)) {
      l = m;
    } else {
      r = m;
    }
  }
  if (r > 5e10) {
    cout << "-1\n";
    return 0;
  }
  cout.precision(42);
  cout.setf(ios::fixed);
  cout << l << endl;
  return 0;
}
