#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
ostream& operator<<(ostream& out, pair<T1, T2>& p) {
  out << "{" << p.first << ", " << p.second << "} ";
  return out;
}
template <typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2>& p) {
  in >> p.fi > p.se;
  return in;
}
template <typename T>
istream& operator>>(istream& in, vector<T>& arr) {
  for (auto& i : arr) in >> i;
  return in;
}
template <typename T>
ostream& operator<<(ostream& out, vector<T>& arr) {
  for (auto i : arr) out << i << " ";
  out << '\n';
  return out;
}
vector<pair<int, int>> arr;
int n, p;
const double eps = 5e-5;
bool check(double mid) {
  long double sum = 0;
  for (int i = 0; i < n; i++) {
    long double cnt = mid * arr[i].first;
    long double need = cnt - arr[i].second;
    if (need >= 1e-14) {
      sum += need;
    }
  }
  return sum <= mid * p;
}
signed main() {
  cin >> n >> p;
  arr.resize(n);
  double all = 0;
  for (int i(0); i < n; i++) {
    cin >> arr[i].first >> arr[i].second;
    all += arr[i].first;
  }
  if (all <= p) {
    cout << -1 << '\n';
    return 0;
  }
  double l = 0.0;
  double r = 1e18;
  while (r - l > eps) {
    double mid = (r + l) / 2;
    if (check(mid)) {
      l = mid;
    } else {
      r = mid;
    }
  }
  cout << l << '\n';
  return 0;
}
