#include <bits/stdc++.h>
using namespace std;
template <class T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
const int maxn = 100100;
int n;
double p;
double a[maxn];
double b[maxn];
double bin(double l, double r) {
  for (int i = 0; i < 1000; ++i) {
    double m = (l + r) / 2.0;
    double M = m;
    bool ok = false;
    for (int i = 0; i < n; ++i) {
      if (1.0 * b[i] >= 1.0 * m * a[i]) continue;
      double x = 1.0 * m * a[i] - 1.0 * b[i];
      x = x / p;
      if (x <= M) {
        M = M - x;
      } else {
        ok = true;
        r = m;
        break;
      }
    }
    if (ok) continue;
    l = m;
  }
  return r;
}
void solve() {
  double s = 0.0;
  scanf("%d %lf", &n, &p);
  for (int i = 0; i < n; ++i) {
    scanf("%lf %lf", a + i, b + i);
    s += a[i];
  }
  if (p >= s) {
    puts("-1");
    return;
  }
  double x = bin(0.0, 1e18);
  printf("%.12lf", x);
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
}
