#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int INF = 0x3f3f3f3f;
int a[100005], b[100005];
int main() {
  ios::sync_with_stdio(false);
  long long n, p;
  string str, pat;
  while (cin >> n >> p) {
    double suma = 0, sumb = 0;
    for (int i = 0; i < n; i++) {
      cin >> a[i] >> b[i];
      sumb += b[i];
      suma += a[i];
    }
    if (suma <= p) {
      cout << -1 << "\n";
      continue;
    }
    double left = 0, right = sumb / (suma - p);
    double mid, temp;
    int cnt = 70;
    while (cnt--) {
      temp = 0;
      mid = (left + right) / 2;
      for (int i = 0; i < n; i++) {
        if (mid * a[i] > b[i]) temp += mid * a[i] - b[i];
      }
      if (temp < mid * p)
        left = mid;
      else
        right = mid;
    }
    cout << left << "\n";
  }
  return 0;
}
