#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > vect;
bool fun(double mid, int p) {
  double req = 0, temp;
  int i;
  for (i = 0; i < vect.size(); i++) {
    temp = (vect[i].first) * mid - vect[i].second;
    if (temp >= 0) req += temp;
  }
  if (req > (mid * p))
    return false;
  else
    return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  long long int n, p, temp, temp1, sum = 0, stored = 0, i;
  cin >> n >> p;
  for (i = 0; i < n; i++) {
    cin >> temp >> temp1;
    vect.push_back(make_pair(temp, temp1));
    sum += temp;
    stored += temp1;
  }
  if (sum <= p) {
    cout << "-1" << endl;
  } else {
    double lo = 0, hi, mid;
    hi = 10000000000001;
    for (i = 0; i < 70; i++) {
      mid = lo + (hi - lo) / 2;
      if (fun(mid, p))
        lo = mid;
      else
        hi = mid;
    }
    cout << mid << endl;
  }
  return 0;
}
