#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100000 + 5;
int n, p;
int a[MAXN], b[MAXN];
double INF = 100000000000.0;
bool jud(double t) {
  double w = 1.0 * p * t;
  for (int i = 0; i < n; i++) {
    if (w < a[i] * t - 1.0 * b[i])
      return false;
    else {
      if (a[i] * t - 1.0 * b[i] > 0) w -= a[i] * t - 1.0 * b[i];
    }
  }
  return true;
}
int main() {
  cin >> n >> p;
  double sum = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &a[i], &b[i]);
    sum += a[i];
  }
  if (sum - p * 1.0 < 1e-12) {
    cout << -1 << endl;
    return 0;
  }
  double l = 0, r = INF;
  int cnt = 0;
  while (r - l > 1e-11) {
    double mid = (l + r) / 2;
    if (!jud(mid))
      r = mid;
    else
      l = mid;
    if (cnt == 300) break;
    cnt++;
  }
  printf("%.9lf\n", l);
  return 0;
}
