#include <bits/stdc++.h>
using namespace std;
double const EPS = 1e-9, PI = acos(-1);
const int N = 1e5 + 9, M = 5e2 + 9, OO = 1e9 + 7, MOD = 1e9 + 9;
const long long inf = 1e18;
double a[N], b[N];
int dcmp(double a, double b) {
  if (fabs(a - b) <= EPS)
    return 0;
  else if (a > b)
    return 1;
  else
    return -1;
}
int main() {
  cout << fixed << setprecision(9), ios::sync_with_stdio(false),
      cin.tie(nullptr), cout.tie(nullptr);
  int n, p;
  cin >> n >> p;
  for (int i = 0; i < n; ++i) cin >> a[i] >> b[i];
  double tt = 0;
  for (int j = 0; j < n; ++j) {
    double temp = 1.0 * b[j] - 1e13 * (1.0 * a[j]);
    if (dcmp(temp, 0) < 0) tt += fabs(temp);
  }
  if (tt <= 1e13 * (1.0 * p)) {
    cout << -1;
    return 0;
  }
  double start = 0, end = 9e12, mid, ans = 2e18;
  for (int i = 0; i < 200; ++i) {
    mid = (start + end) / 2.0;
    double total = 0;
    for (int j = 0; j < n; ++j) {
      double temp = 1.0 * b[j] - mid * (1.0 * a[j]);
      if (dcmp(temp, 0) < 0) total += fabs(temp);
    }
    if (total <= mid * (1.0 * p)) {
      ans = mid;
      start = mid + EPS;
    } else
      end = mid - EPS;
  }
  cout << ans;
  return 0;
}
