#include <bits/stdc++.h>
using namespace std;
const double eps = (double)1e-5;
const int N = 100010;
int n;
double p;
double a[N], b[N];
bool check(double mid) {
  double sum = 0;
  for (int i = 0; i < n; ++i) {
    sum += max(0.0, (a[i] * mid - b[i]) / p);
  }
  return sum <= mid;
}
int main() {
  scanf("%d %lf", &n, &p);
  double ll = 0.0, rr = (double)1e15;
  int cnt = 0;
  for (int i = 0; i < n; ++i) {
    scanf("%lf %lf", a + i, b + i);
  }
  double limit = (double)1e15;
  if (check(limit)) {
    cout << "-1";
    return 0;
  }
  while (ll + eps < rr) {
    double mm = (ll + rr) / 2.0;
    if (check(mm))
      ll = mm;
    else
      rr = mm;
  }
  printf("%.6lf\n", ll);
  return 0;
}
