#include <bits/stdc++.h>
using namespace std;
typedef struct mytype {
  long long int a, b;
} mytype;
bool myfn(const mytype &X, const mytype &Y) { return X.b * Y.a <= X.a * Y.b; }
int main() {
  long double n, p;
  cin >> n >> p;
  vector<mytype> A(n);
  long double aa = 0;
  for (int i = 0; i < n; i++) {
    cin >> A[i].a >> A[i].b;
    aa += A[i].a;
  }
  if (aa <= p) {
    cout << -1;
    return 0;
  }
  long double low = 0, high = 1e14, pp, xx;
  while (high - low > 1e-4) {
    long double mid = (low + high) / 2.0;
    long double temp = 0;
    for (int i = 0; i < n; i++) {
      xx = max((long double)0.0, mid * A[i].a - A[i].b);
      temp = temp + xx;
    }
    pp = p * mid;
    if (temp <= pp) {
      low = mid;
    } else {
      high = mid;
    }
  }
  cout << fixed << setprecision(10) << low;
  return 0;
}
