#include <bits/stdc++.h>
using namespace std;
const int INF = 0x7fffffff;
struct dev {
  double a, b;
} d[100000 + 50];
double time(dev u) { return 1.0 * u.b / u.a; }
bool cmp(dev u, dev v) { return time(u) < time(v); }
int main() {
  int n, p, h = 0;
  scanf("%d%d", &n, &p);
  for (int i = 0; i < n; i++) {
    scanf("%lf%lf", &d[i].a, &d[i].b);
    h += d[i].b;
  }
  sort(d, d + n, cmp);
  dev u;
  u.a = -p;
  u.b = 0;
  double ans = INF;
  for (int i = 0; i < n; i++) {
    if (u.a > 0) {
      if (time(u) <= time(d[i])) break;
    }
    u.a += d[i].a;
    u.b += d[i].b;
  }
  if (u.a <= 0)
    printf("-1\n");
  else
    printf("%lf", time(u));
  return 0;
}
