#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const double eps = 1e-8;
const int mod = 1000000007;
const double pi = acos(-1.0);
inline void gn(long long& x) {
  int sg = 1;
  char c;
  while (((c = getchar()) < '0' || c > '9') && c != '-')
    ;
  c == '-' ? (sg = -1, x = 0) : (x = c - '0');
  while ((c = getchar()) >= '0' && c <= '9') x = x * 10 + c - '0';
  x *= sg;
}
inline void gn(int& x) {
  long long t;
  gn(t);
  x = t;
}
inline void gn(unsigned long long& x) {
  long long t;
  gn(t);
  x = t;
}
long long gcd(long long a, long long b) { return a ? gcd(b % a, a) : b; }
long long powmod(long long a, long long x, long long mod) {
  long long t = 1ll;
  while (x) {
    if (x & 1) t = t * a % mod;
    a = a * a % mod;
    x >>= 1;
  }
  return t;
}
int n;
long long p;
const int maxn = 1e5 + 5;
long long a[maxn], b[maxn];
bool check(double time) {
  double ext = 0;
  for (int i = (1); i <= (n); i++) {
    double cst = time * a[i];
    double need = max(0.0, cst - b[i]);
    ext += need;
  }
  double can = time * p;
  return can >= ext;
}
int main() {
  gn(n);
  gn(p);
  long long su = 0;
  double l = -1, r;
  for (int i = (1); i <= (n); i++) {
    gn(a[i]);
    gn(b[i]);
    su += a[i];
    if (l == -1)
      l = b[i] * 1.0 / a[i];
    else
      l = min(l, b[i] * 1.0 / a[i]);
  }
  if (p >= su) {
    puts("-1");
    return 0;
  }
  r = 2 * l;
  while (check(r)) {
    l = r;
    r *= 2;
  };
  ;
  for (int i = (1); i <= (200); i++) {
    double mid = 0.5 * (l + r);
    if (check(mid))
      l = mid;
    else
      r = mid;
  }
  printf("%.20lf\n", l);
  return 0;
}
