#include <bits/stdc++.h>
using namespace std;
const int _N = 3e5 + 11;
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
const double EPS = 1e-5;
double n, p, a[_N], b[_N], sum = 0;
bool can(double seco) {
  vector<double> pp(n);
  double ad = p * seco;
  for (int i = 0; i < n; i++) {
    pp[i] = b[i] - a[i] * seco;
    if (pp[i] < 0) ad += pp[i];
  }
  return (ad >= 0);
}
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie();
  cout.tie();
  cout << fixed;
  cout << setprecision(15);
  srand(time(NULL));
  cin >> n >> p;
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    sum += a[i];
  }
  if (sum <= p) {
    cout << -1 << '\n';
    return 0;
  }
  double lo = 0.000000, hi = 1e18 + 1.000000;
  while (hi - lo > EPS) {
    double md = (lo + hi) / 2.0;
    if (can(md))
      lo = md;
    else
      hi = md;
  }
  cout << lo << '\n';
  return 0;
}
