#include <bits/stdc++.h>
using namespace std;
int a[100005], b[100005], p, n;
double mid;
double ans;
inline bool check(double mid) {
  double sum = 0;
  for (int i = 0; i < n; i++) {
    if (b[i] - (mid * a[i]) < 0) sum += (mid * a[i] - b[i]);
  }
  if (p * mid > sum)
    return true;
  else
    return false;
}
inline void binarysearch(double l, double r) {
  if ((r - l) <= 1e-5) return;
  if (l < r) {
    mid = l + (r - l) / 2;
    int c = check(mid);
    if (c == true) {
      ans = mid;
      binarysearch(mid, r);
    } else {
      binarysearch(l, mid);
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  double l, r;
  cin >> n >> p;
  for (int i = 0; i < n; i++) cin >> a[i] >> b[i];
  ans = -1;
  binarysearch(0, 1e11);
  cout << fixed << showpoint;
  cout << setprecision(4);
  if (ceil(ans) >= 99975359173 || floor(ans) >= 99975359173) {
    cout << "-1\n";
    return 0;
  }
  cout << ans;
  return 0;
}
