#include <bits/stdc++.h>
using namespace std;
vector<int> a, b;
bool f(long double m, long double p) {
  long double sum = 0;
  for (int i = 1; i < a.size(); ++i) {
    sum += max((long double)0, a[i] * m - b[i]) / p;
    if (sum > m) return false;
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, p, cnt = 100;
  cin >> n >> p;
  a = b = vector<int>(n + 1);
  for (int i = 1; i <= n; ++i) cin >> a[i] >> b[i];
  long double s = 0.0, e = 100000000000000.0, m, ans = 100000000000000.0;
  while (s <= e && cnt--) {
    m = (s + e) / 2;
    if (f(m, p)) {
      ans = m;
      s = m;
    } else
      e = m;
  }
  if (ans >= 1000000000000.0) {
    cout << -1;
    return 0;
  }
  cout << fixed << setprecision(5) << ans;
}
