#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int a[maxn], b[maxn];
int main() {
  int n;
  long long p;
  scanf("%d%I64d", &n, &p);
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &a[i], &b[i]);
  }
  double l = 0, r = 1e11;
  while (fabs(l - r) > 1e-4) {
    double mid = (l + r) / 2.0;
    double cnt = 0;
    for (int i = 0; i < n; i++) {
      double need = ((double)a[i] * mid - (double)b[i]) / (double)p;
      if (need <= 0) continue;
      cnt += need;
    }
    if (cnt <= mid) {
      l = mid;
    } else {
      r = mid;
    }
  }
  if (l > 1e10)
    cout << "-1" << endl;
  else
    printf("%.10f", l);
  return 0;
}
