#include <bits/stdc++.h>
using namespace std;
int n;
long double p, ara[100005][3];
bool check(long double x) {
  long double tot;
  int i, j;
  tot = p * x;
  for (i = 0; i < n; i++) {
    long double need = ara[i][0] * x;
    if (ara[i][1] < need) {
      long double dif = need - ara[i][1];
      if (tot < dif || tot < 0.00) {
        return false;
      }
      tot -= dif;
    }
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long double lo, hi, mid, ans;
  int i, j;
  cin >> n >> p;
  for (i = 0; i < n; i++) {
    cin >> ara[i][0] >> ara[i][1];
  }
  lo = 0, hi = 10000000000.00;
  while ((hi - lo) > 0.0001) {
    mid = (lo + hi) / 2.0;
    bool p = check(mid);
    if (p) {
      lo = mid;
      ans = mid;
    } else {
      hi = mid;
    }
  }
  if (fabs(ans - 10000000000) <= 0.1)
    cout << -1 << endl;
  else
    cout << ans << endl;
  return 0;
}
