#include <bits/stdc++.h>
using namespace std;
vector<pair<double, double> > v;
int n, p;
bool calc(double l) {
  double sum = 0;
  for (int i = 0; i < n; i++) {
    double a = v[i].first, b = v[i].second;
    if (a * l - b > 0) sum += (a * l - b) / p;
  }
  return sum < l || fabs(sum - l) <= 1e-15;
}
int main() {
  scanf("%d%d", &n, &p);
  double a, b;
  for (int i = 0; i < n; i++) {
    scanf("%lf%lf", &a, &b);
    v.push_back(make_pair(a, b));
  }
  double l = 0, r = 1e18;
  double ans = -1;
  for (int it = 0; it <= 800; it++) {
    double mid = (l + r) / 2;
    if (calc(mid)) {
      l = mid;
      ans = max(ans, mid);
    } else
      r = mid;
  }
  if (ans > 1e17) {
    puts("-1");
  } else
    printf("%.6lf", ans);
  return 0;
}
