#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fLL;
const int maxn = 1e3 + 5;
const int maxx = 1e5 + 100;
const int MAX_N = 1000006;
const int MAX_Tot = 500005;
const double EPS = 1e-5;
const int MOD = 1000000007;
template <class T>
inline T min(T a, T b, T c) {
  return min(min(a, b), c);
}
template <class T>
inline T max(T a, T b, T c) {
  return max(max(a, b), c);
}
template <class T>
inline T min(T a, T b, T c, T d) {
  return min(min(a, b), min(c, d));
}
template <class T>
inline T max(T a, T b, T c, T d) {
  return max(max(a, b), max(c, d));
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  a %= b;
  return gcd(b, a);
}
inline int Scan() {
  int res = 0, ch, flag = 0;
  if ((ch = getchar()) == '-')
    flag = 1;
  else if (ch >= '0' && ch <= '9')
    res = ch - '0';
  while ((ch = getchar()) >= '0' && ch <= '9') res = res * 10 + ch - '0';
  return flag ? -res : res;
}
int n, p;
struct node {
  int a, b;
} Q[maxx];
bool check(double x) {
  double sum = 0;
  for (int i = 1; i <= n; i++) sum += max(0.0, Q[i].a * x - Q[i].b);
  if (sum < x * p)
    return true;
  else
    return false;
}
int main() {
  cin >> n >> p;
  double t = 0;
  for (int i = 1; i <= n; i++) {
    cin >> Q[i].a >> Q[i].b;
    t += Q[i].a;
  }
  if (t <= p) {
    cout << -1 << '\n';
    return 0;
  }
  double l = 0, r = 1e12;
  while ((r - l) > EPS) {
    double mid = (l + r) / 2;
    if (check(mid))
      l = mid;
    else
      r = mid;
  }
  printf("%.8lf\n", l);
}
