#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
template <class T>
int getbit(T x, int pos) {
  return (x >> (pos - 1)) & 1;
}
template <class T>
void turn_on(T &x, int pos) {
  x = x | ((T)1 << (pos - 1));
}
template <class T>
void turn_off(T &x, int pos) {
  x = x & ~((T)1 << (pos - 1));
}
template <class T>
T sqr(T a) {
  return a * a;
}
int n;
long long p;
struct iii {
  long long first, second;
  double c;
  iii() {}
  iii(long long x, long long y) {
    first = x;
    second = y;
  }
} a[100002];
bool IsEqual(double a, double b, double _eps = 1e-4) {
  return abs(a - b) <= _eps;
}
bool cmp(iii a, iii b) { return a.c > b.c; }
bool check(double t) {
  for (int i = 1; i <= n; ++i)
    a[i].c = double(a[i].first) * t - double(a[i].second);
  sort(a + 1, a + n + 1, cmp);
  double s = 0, tmp = t * double(p);
  for (int i = 1; i <= n; ++i) {
    if (tmp - a[i].c < s) return false;
    s += a[i].c;
  }
  return true;
}
void bisect() {
  double l = 0, r = 1e10;
  while (true) {
    double mid = (l + r) / 2;
    if (check(mid))
      l = mid;
    else
      r = mid;
    if (IsEqual(l, r)) break;
  }
  if (IsEqual(r, 1e10))
    cout << -1;
  else
    cout << setiosflags(ios::fixed) << setprecision(10) << r;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> p;
  for (int i = 1; i <= n; ++i) cin >> a[i].first >> a[i].second;
  bisect();
}
