#include <bits/stdc++.h>
using namespace std;
int n, p;
int a[100009], b[100009];
double r = -1;
bool check(double x) {
  double w = x;
  for (int i = 0; i < n; i++) {
    if (a[i] * x > b[i]) {
      w -= (a[i] * x - b[i]) / p;
    }
  }
  if (w > 0)
    return true;
  else
    return false;
}
double solve() {
  double l = 0;
  while (r - l > 0.0001) {
    double mid = (r + l) / 2;
    bool flag = check(mid);
    if (flag)
      l = mid;
    else
      r = mid;
  }
  return r;
}
int main() {
  scanf("%d%d", &n, &p);
  for (int i = 0; i < n; i++) scanf("%d%d", &a[i], &b[i]);
  r = -1;
  for (int i = 0; i < n; i++) {
    if (a[i] > p) {
      double m = b[i] / (a[i] - p);
      r = max(r, m);
    }
  }
  long long ca = 0, cb = 0;
  for (int i = 0; i < n; i++) {
    ca += a[i];
  }
  if (ca <= p)
    printf("-1");
  else {
    r = 1e11;
    printf("%lf", solve());
  }
}
