#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const long long llinf = 1e12;
const int maxn = 1e5 + 5;
const int mod = 1e9 + 7;
const double eps = 1e-5;
struct node {
  long long a, b;
} no[maxn];
long long n, p;
bool check(double t) {
  double add = t * p;
  for (int i = 0; i < n; i++) {
    double x = no[i].b - no[i].a * t;
    if (x <= 0) add += x;
  }
  return add >= 0;
}
int main() {
  while (~scanf("%lld%lld", &n, &p)) {
    long long sum = 0;
    for (int i = 0; i < n; i++) {
      scanf("%lld%lld", &no[i].a, &no[i].b);
      sum += no[i].a;
    }
    if (sum <= p) {
      printf("-1\n");
      continue;
    }
    double l = 0, r = 1e12;
    double mid;
    for (int i = 0; i < 100; i++) {
      mid = (l + r) / 2.0;
      if (check(mid)) {
        l = mid;
      } else {
        r = mid;
      }
    }
    printf("%.6f\n", mid);
  }
  return 0;
}
