#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const long double MAX = 1e18;
int a[N], n, p, b[N];
long double exhausted[N];
bool check(long double k) {
  long double supply = k * (long double)p;
  long double need = 0;
  for (int i = 1; i <= n; i++) {
    need += max((long double)0.0, (k - exhausted[i]) * (long double)a[i]);
  }
  return supply >= need;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> p;
  long long sum = 0;
  for (int i = 1; i <= n; i++) cin >> a[i] >> b[i], sum += a[i];
  if (p >= sum) {
    cout << -1;
    exit(0);
  }
  for (int i = 1; i <= n; i++) {
    exhausted[i] = (long double)b[i] / (long double)a[i];
  }
  long double l = 0, r = MAX;
  for (int it = 1; it <= 100; it++) {
    long double m = (r + l) / 2;
    if (check(m))
      l = m;
    else
      r = m;
  }
  if (r == MAX) {
    cout << -1;
  } else
    printf("%.9f\n", (double)l);
  return 0;
}
