#include <bits/stdc++.h>
using namespace std;
long long int root(long long int low, long long int high, long long int n) {
  if (high - low <= 1) return low;
  long long int mid = (low + high) / 2;
  if (mid * mid < n) return root(mid, high, n);
  return root(low, mid, n);
}
long long int maxm(long long int a[], long long int n, long long int start) {
  long long int idx = -10000000000000000;
  for (long long int i = start; i < start + n; i++) {
    idx = max(idx, a[i]);
  }
  return idx;
}
double a[100005], b[100005];
vector<pair<double, int> > v;
int main() {
  double p;
  int n;
  cin >> n >> p;
  for (int i = 0; i < n; i++) cin >> a[i] >> b[i];
  for (int i = 0; i < n; i++) v.push_back(make_pair(b[i] / a[i], i));
  sort(v.begin(), v.end());
  double low = 0, high = 10000000000;
  int cnt = 200;
  while (cnt--) {
    double mid = (high + low) / 2;
    double supply = p * mid;
    double req = 0;
    for (int i = 0; i < n; i++)
      if (v[i].first <= mid)
        req += a[v[i].second] * mid - b[v[i].second];
      else
        break;
    if (req <= supply)
      low = mid;
    else
      high = mid;
  }
  if (low == 10000000000)
    printf("-1\n");
  else
    printf("%lf\n", low);
  return 0;
}
