#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
double a[100005], b[100005];
int n;
double p;
bool fun(double x) {
  double excess = p * 1.0 * x;
  double tmp;
  for (int i = 0; i < n; i++) {
    tmp = a[i] * x - b[i];
    if (tmp > 0) excess -= tmp;
    if (excess < 0) return false;
  }
  return true;
}
double binsearch() {
  double l = 0, r = 1e12, mid, ans;
  while ((r - l) > eps) {
    mid = (l + r) / 2;
    if (fun(mid))
      l = mid, ans = mid;
    else
      r = mid;
  }
  return ans;
}
int main(int argc, char const *argv[]) {
  double ss = 0;
  scanf("%d %lf", &n, &p);
  for (int i = 0; i < n; i++) {
    scanf("%lf %lf", &a[i], &b[i]);
    ss += a[i];
  }
  if ((p - ss) >= -eps) {
    cout << -1 << "\n";
    return 0;
  }
  double ans = binsearch();
  printf("%.8lf\n", ans);
  return 0;
}
