#include <bits/stdc++.h>
using namespace std;
int POW[100001];
int STOR[100001];
int n, ai, bi;
long long int p;
bool is_enough(long double time) {
  long double deficit = 0;
  for (int i = 0; i < n; ++i) {
    long double need = time * POW[i] - STOR[i];
    if (need > 0) {
      deficit += need;
    }
  }
  return deficit / p < time;
}
int main() {
  cin >> n >> p;
  long long int suma = 0;
  for (int i = 0; i < n; ++i) {
    cin >> ai >> bi;
    POW[i] = ai;
    STOR[i] = bi;
    suma += ai;
  }
  if (suma <= p) {
    cout << "-1" << endl;
    return 0;
  }
  long double low = 0;
  long double high = 10000000000005;
  while (high - low > 0.0000001) {
    long double middle = (high + low) / 2;
    if (is_enough(middle)) {
      low = middle;
    } else {
      high = middle;
    }
  }
  cout << (low + high) / 2 << endl;
  return 0;
}
