#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-7;
struct node {
  double c, n, t;
} p[123456];
int n;
double pi;
int get(double m) {
  double now = 0;
  for (int i = 0; i < n; i++) {
    now += max(0.0, m * p[i].c - p[i].n);
  }
  return m * pi >= now;
}
int main() {
  cin >> n >> pi;
  double sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> p[i].c >> p[i].n;
    p[i].t = p[i].n / p[i].c;
    sum += p[i].c;
  }
  double l = 0, r = 1e18;
  double ans = 0;
  for (int k = 0; k < 200; k++) {
    double mid = (l + r) / 2;
    if (get(mid)) {
      l = mid;
      ans = mid;
    } else {
      r = mid;
    }
  }
  if (sum <= pi || ans >= 1e18 - 100) ans = -1;
  cout << ans << endl;
  return 0;
}
