#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const double pi = acos(-1.0);
const int K = 1e6 + 7;
const int mod = 1e9 + 7;
int n, p, a[K], b[K];
double ans;
bool check(double x) {
  double sum = 0;
  for (int i = 1; i <= n; i++) {
    sum += max(a[i] * x - b[i], 0.0);
    if (sum >= x * p + 1e-10) return 0;
  }
  return 1;
}
int main(void) {
  cin >> n >> p;
  for (int i = 1; i <= n; i++) scanf("%d%d", a + i, b + i);
  double l = 0, r = 1e10;
  for (int i = 1; i <= 100; i++) {
    double mid = (l + r) / 2.0;
    if (check(mid))
      ans = mid, l = mid;
    else
      r = mid;
  }
  if (fabs(ans - 1e10) <= 1e-8)
    printf("-1\n");
  else
    printf("%.8f\n", ans);
  return 0;
}
