#include <bits/stdc++.h>
using namespace std;
const double INF = 1e16;
const int MAX = 1e5 + 5;
int n, p, a[MAX], b[MAX];
bool f(double t) {
  double s = 0;
  for (int i = 1; i <= n; i++) {
    double v = t / (0.0 + p);
    if (v > 1e18 / (0.0 + a[i])) return 0;
    double l = max(0.0, v * a[i] - 1.0 * b[i] / p);
    s += l;
  }
  return s <= t;
}
int main() {
  scanf("%d%d", &n, &p);
  for (int i = 1; i <= n; i++) scanf("%d%d", &a[i], &b[i]);
  double st = 0, nd = INF;
  for (int i = 1; i <= 200; i++) {
    double mid = (st + nd) / 2.0;
    if (f(mid))
      st = mid;
    else
      nd = mid;
  }
  double ans = (st + nd) / 2.0;
  if (ans >= 1e14) {
    printf("-1\n");
    return 0;
  }
  printf("%.7lf\n", ans);
  return 0;
}
