#include <bits/stdc++.h>
using namespace std;
const int maxn = 100050;
const double eps = 1e-5;
double n, p, sum = 0;
struct node {
  double a, b;
} s[maxn];
bool judge(double t) {
  double sum = p * 1.0 * t;
  double sub;
  for (int i = 1; i <= n; i++) {
    sub = s[i].a * t - s[i].b;
    if (sub > 0) sum -= sub;
    if (sum < 0) return false;
  }
  return true;
}
double Two_find() {
  double left = 0, right = 1e10, mid, ans;
  while (left + eps <= right) {
    double mid = (left + right) / 2;
    if (judge(mid))
      left = mid, ans = mid;
    else
      right = mid;
  }
  return ans;
}
int main() {
  std::ios::sync_with_stdio(false);
  cin >> n >> p;
  for (int i = 1; i <= n; i++) {
    cin >> s[i].a >> s[i].b;
    sum += s[i].a;
  }
  if (p >= sum) {
    printf("-1\n");
    return 0;
  }
  double ans = Two_find();
  printf("%.8lf", ans);
  return 0;
}
