#include <bits/stdc++.h>
using namespace std;
using itn = int;
const long double PI = 3.141592653589793238;
long long pow(long long x, long long pw) {
  long long res = 1;
  for (; pw; pw >>= 1) {
    if (pw & 1) {
      res *= x;
    }
    x = x * x;
  }
  return res;
}
long long gcd(long long a, long long b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
long long lcd(long long a, long long b) { return a * b / gcd(a, b); }
int main() {
  cout << setprecision(20);
  ios_base::sync_with_stdio(false);
  int n, p;
  cin >> n >> p;
  vector<int> a(n);
  vector<int> b(n);
  long long B = 0;
  for (int i = 0; i < n; ++i) {
    cin >> b[i] >> a[i];
    B += b[i];
  }
  if (B <= p) {
    cout << "-1";
    exit(0);
  }
  double l = 0;
  double r = 10000000001;
  while (r - l > 0.000001) {
    double mid = (l + r) / 2;
    double need_p = 0;
    for (int i = 0; i < n; ++i) {
      need_p += max(0.0, b[i] - a[i] / mid);
    }
    if (need_p > p) {
      r = mid;
    } else {
      l = mid;
    }
  }
  cout << l;
  return 0;
}
