#include <bits/stdc++.h>
using namespace std;
int n;
long long p;
int a[100005], b[100005];
bool ok(double x) {
  double res = x * p * 1.0;
  for (int i = 0; i < n; i++) {
    if (b[i] * 1.0 / a[i] - x > 1e-5) {
      continue;
    } else {
      res -= (a[i] * x * 1.0 - b[i]) * 1.0;
    }
    if (res < 1e-5) {
      return false;
    }
  }
  return true;
}
int main() {
  scanf("%d%d", &n, &p);
  long long res = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &a[i], &b[i]);
    res += a[i];
  }
  if (p >= res) {
    puts("-1");
    return 0;
  }
  double l = 0, r = 100000000007, mid;
  while (r - l > 1e-5) {
    mid = (l + r) / 2.0;
    if (ok(mid) == true) {
      l = mid;
    } else {
      r = mid;
    }
  }
  printf("%.5lf\n", mid);
  return 0;
}
