#include <bits/stdc++.h>
using namespace std;
const double eps = 0.000000001;
int a[100005], b[100005];
int n;
double p;
bool OK(double t) {
  int i;
  double res, need;
  need = 0;
  for (i = 1; i <= n; i++) {
    res = t * a[i];
    if (res > b[i]) need += (double)(res - b[i]) / p;
  }
  return need <= t;
}
int main() {
  int i;
  double low, high, mid, ans;
  scanf("%d%lf", &n, &p);
  for (i = 1; i <= n; i++) scanf("%d%d", &a[i], &b[i]);
  low = 0;
  high = 10000000000;
  while (high - low > eps) {
    mid = (low + high) / 2;
    if (OK(mid)) {
      ans = mid;
      low = mid;
    } else
      high = mid;
  }
  if (ans == 10000000000)
    printf("-1\n");
  else
    printf("%.9lf\n", ans);
  return 0;
}
