#include <bits/stdc++.h>
using namespace std;
int n;
double m;
pair<double, double> devs[100005];
bool good(double time) {
  double sum = 0;
  for (int i = 0; i < n; i++) {
    double needed = max(0., devs[i].first * time - devs[i].second);
    sum += needed / time;
  }
  return sum <= m;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> devs[i].first >> devs[i].second;
  }
  double l = 0, r = 1e20 + 2, mid = 0;
  for (int f = 0; f < 200; f++) {
    mid = (l + r) / 2;
    bool ok = good(mid);
    if (ok) {
      l = mid;
    } else
      r = mid;
  }
  if (l >= 1e18) {
    cout << -1;
    return 0;
  }
  cout << fixed << setprecision(10) << (r + l) / 2;
  return 0;
}
