#include <bits/stdc++.h>
using namespace std;
const int seed = 131;
const long long INF = 1e11;
const int maxn = 2e5 + 5;
const int mod = 998244353;
int n, p;
struct node {
  double a, b;
} e[maxn];
bool check(double mid) {
  double cost = 0;
  for (int i = 1; i <= n; i++) {
    if (e[i].b > e[i].a * mid)
      continue;
    else {
      double need = 1.0 * e[i].a * mid - 1.0 * e[i].b;
      cost += 1.0 * need / p;
    }
  }
  if (cost <= mid)
    return 1;
  else
    return 0;
}
int main() {
  scanf("%d%d", &n, &p);
  long double s = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%lf%lf", &e[i].a, &e[i].b);
    s += e[i].a;
  }
  if (s <= p) {
    printf("-1\n");
    return 0;
  }
  double left = 0;
  double right = INF;
  double ans = 0;
  for (int i = 1; i <= 100; i++) {
    double mid = (left + right) / 2;
    if (check(mid)) {
      left = mid;
      ans = mid;
    } else
      right = mid;
  }
  printf("%.6f\n", right);
  return 0;
}
