#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using LD = long double;
struct d {
  LL a, b;
};
d devices[100005];
LL n, p;
bool f(LD med) {
  LD check = 0;
  for (int i = 0; i < n; i++) {
    check += max((long double)0.0, med * devices[i].a - devices[i].b) / med;
  }
  return check <= p;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> p;
  for (int i = 0; i < n; i++) {
    LL a, b;
    cin >> a >> b;
    devices[i].a = a;
    devices[i].b = b;
  }
  LD rateSum = 0;
  for (int i = 0; i < n; i++) rateSum += devices[i].a;
  if (p >= rateSum) {
    cout << "-1" << endl;
    return 0;
  }
  LD low = 0, high = 1.0 * LLONG_MAX;
  while (fabs(high - low) > 1e-9) {
    LD med = low + (high - low) / 2;
    if (f(med)) {
      low = med;
    } else {
      high = med;
    }
  }
  cout << fixed << setprecision(9) << low << endl;
  return 0;
}
