#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
int n, p;
vector<pll> v;
double fun(double k) {
  double vl = k * p;
  for (int i = 0; i < n; i++)
    if (v[i].second - v[i].first * k < 0) vl += v[i].second - v[i].first * k;
  return vl;
}
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> p;
  v.resize(n);
  for (int i = 0; i < n; i++) cin >> v[i].first >> v[i].second;
  double low, high, mid;
  low = 0;
  high = 1e33;
  double spend, ger;
  mid = (low + high) / 2;
  spend = 0;
  for (int i = 0; i < n; i++) {
    spend += v[i].first;
  }
  if (spend <= p) {
    cout << -1 << endl;
    return 0;
  }
  while ((high - low) / max(mid, 1.0) > 1e-7) {
    if (fun(mid) >= 0)
      low = mid;
    else
      high = mid;
    mid = (low + high) / 2;
  }
  cout << setprecision(7) << fixed << low << endl;
}
