#include <bits/stdc++.h>
using namespace std;
int inf_int = 1e9;
long long inf_ll = 1e16;
const double pi = 3.1415926535898;
const int mod = 1e9 + 9;
const int MAXN = 2e5 + 100;
bool debug = false;
int a[MAXN], b[MAXN];
int n;
long long p;
bool ok(long double m) {
  long double need = 0;
  for (int i = 1; i <= n; ++i) {
    need += max((long double)0.0, m * a[i] - b[i]);
  }
  return need < m * p;
}
void solve() {
  cin >> n;
  cin >> p;
  long long sum = 0;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i] >> b[i];
    sum += a[i];
  }
  if (sum <= p) {
    cout << -1;
    return;
  }
  int z = 100;
  long double l = 0, r = 1e15;
  while (z--) {
    long double m = (l + r) / 2;
    if (ok(m)) {
      l = m;
    } else {
      r = m;
    }
  }
  cout << fixed << setprecision(10) << l;
}
int main() {
  if (!debug) {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
  }
  int t = 1;
  while (t--) solve();
  return 0;
}
