#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
const long long INF = 1e17;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long n, p;
  cin >> n >> p;
  vector<pair<long long, long long> > a(n);
  long long sm = 0;
  for (long long i = 0; i < n; i++) {
    cin >> a[i].first >> a[i].second;
    sm += a[i].first;
  }
  if (sm <= p) {
    cout << "-1\n";
    return 0;
  }
  long double l = 0, r = INF;
  for (long long i = 0; i < 100; i++) {
    long double m = (l + r) / 2;
    long double need = 0;
    for (auto item : a) {
      need += max((long double)0, item.first * m - item.second) / p;
    }
    if (need <= m) {
      l = m;
    } else {
      r = m;
    }
  }
  cout << fixed << setprecision(10);
  cout << (double)l << "\n";
  return 0;
}
