#include <bits/stdc++.h>
using namespace std;
const int MAX = (int)1e5 + 5;
int n, p, a[MAX], b[MAX];
bool Can(double t) {
  double sum = 0.0;
  for (int i = 0; i < n; i++) {
    sum += max(0.0, t * a[i] - b[i]);
    if (sum > t * p) return false;
  }
  return true;
}
int main() {
  while (scanf("%d %d", &n, &p) == 2) {
    for (int i = 0; i < n; i++) scanf("%d %d", &a[i], &b[i]);
    long long int sum = 0ll;
    for (int i = 0; i < n; i++) sum += a[i];
    if (p >= sum)
      puts("-1");
    else {
      double i = 0.0, j = 1e14 + 5;
      int k = 100;
      while (k--) {
        double mid = (i + j) / 2.0;
        if (Can(mid))
          i = mid;
        else
          j = mid;
      }
      printf("%.14f\n", i);
    }
  }
  return 0;
}
