#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
const long double inf = 1e10;
int a[maxn];
int b[maxn];
int n, p;
inline bool can(long double T) {
  long double sum = 0.0;
  for (int i = 0; i < (int)n; i++) {
    long double tmp = T * a[i] - b[i];
    if (tmp >= 0) sum += tmp / p;
  }
  return sum <= T;
}
int main() {
  scanf("%d%d", &n, &p);
  for (int i = 0; i < (int)n; i++) scanf("%d%d", &a[i], &b[i]);
  long long sum = 0;
  for (int i = 0; i < (int)n; i++) sum += a[i];
  if (sum <= p) {
    printf("-1");
    exit(0);
  }
  long double start = 0.0;
  long double finish = 1.1 * inf;
  for (int it = 0; it < (int)500; it++) {
    long double mid = (start + finish) / 2;
    if (can(mid)) {
      start = mid;
    } else {
      finish = mid;
    }
  }
  printf("%.10lf", (double)start);
}
