#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
const double INF = 1e14;
const int mod = 1e9;
int N;
double P;
struct Point {
  double a, b;
} point[maxn];
bool check(double t) {
  double sum = t * P;
  for (int i = 1; i <= N; i++) {
    double x = point[i].b - point[i].a * t;
    if (x < 0) sum += x;
  }
  return (sum >= 0);
}
double solve() {
  double left = 0;
  double right = INF;
  for (int i = 0; i < 100; i++) {
    double mid = (left + right) / 2;
    if (check(mid)) {
      left = mid;
    } else {
      right = mid;
    }
  }
  if (fabs(left - INF) < 1e-9) {
    return -1;
  } else {
    return left;
  }
}
int main() {
  scanf("%d%lf", &N, &P);
  double SUM = P;
  for (int i = 1; i <= N; i++) {
    scanf("%lf%lf", &point[i].a, &point[i].b);
    SUM -= point[i].a;
  }
  if (SUM >= 0) {
    printf("-1");
    return 0;
  }
  double ans = solve();
  printf("%.10lf", ans);
  return 0;
}
