#include <bits/stdc++.h>
using namespace std;
long long n, power, usage[1000007], ini[1000007];
bool check(long double ti) {
  long double needSum = 0.0;
  for (long long i = 1; i <= n; ++i) {
    long double need = max(0.0L, ti * usage[i] - ini[i]);
    needSum += need;
  }
  return ti * power >= needSum;
}
long double BSdouble(long double lo, long double hi) {
  long double mid;
  for (long long iterations = 0; iterations < (200); ++iterations) {
    mid = lo + (hi - lo) / 2;
    if (check(mid))
      lo = mid;
    else
      hi = mid;
  }
  return lo;
}
void solve() {
  cin >> n >> power;
  for (long long i = 1; i <= (n); ++i) cin >> usage[i] >> ini[i];
  long long usageSum = 0;
  for (long long i = 1; i <= (n); ++i) usageSum += usage[i];
  if (power >= usageSum) {
    cout << "-1";
    return;
  }
  long double rst = BSdouble(0.0L, 1000000000000000007LL);
  if (rst >= 1000000000000000007LL - 100)
    cout << "-1";
  else
    cout << rst;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout << fixed << setprecision(10);
  solve();
  return 0;
}
