#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9;
const int mod = (int)1e9 + 7;
int n, p;
int a[100100], b[100100];
long long getTotal() {
  long long sum = 0;
  for (int i = 0; i < n; i++) sum += a[i];
  return sum;
}
bool check(double t) {
  double sum = 0.0;
  for (int i = 0; i < n; i++) {
    double A = b[i] - a[i] * t;
    if (A < 0) sum += abs(A);
  }
  return sum / p < t;
}
int main() {
  scanf("%d%d", &n, &p);
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &a[i], &b[i]);
  }
  if (p >= getTotal()) {
    cout << -1 << endl;
    return 0;
  }
  double l = 0, r = 1e18;
  for (int iter = 0; iter < 1000; iter++) {
    double mid = (l + r) / 2;
    if (check(mid)) {
      l = mid;
    } else {
      r = mid;
    }
  }
  printf("%.10f\n", l);
  return 0;
}
