#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int MAXN = 100000;
const int N = 45;
struct Node {
  int w;
  int cost;
} node[MAXN];
int n, m;
bool judge(double mid) {
  double x = 0;
  double y = 0;
  for (int i = 0; i < n; i++) {
    if (node[i].cost - (double)node[i].w / mid >= 0) {
      x += node[i].cost - (double)node[i].w / mid;
    }
  }
  if ((double)m >= x)
    return true;
  else
    return false;
}
int main() {
  cin >> n >> m;
  long long num = 0;
  for (int i = 0; i < n; i++) {
    cin >> node[i].cost;
    cin >> node[i].w;
    num += node[i].cost;
  }
  double l, r, mid;
  l = 0;
  r = 1e18;
  mid = 0;
  if (num <= m) {
    cout << -1 << endl;
    return 0;
  }
  while (fabs((l + (r - l) / 2.0) - mid) >= (1e-6)) {
    mid = l + (r - l) / 2.0;
    if (judge(mid)) {
      l = mid;
    } else {
      r = mid;
    }
  }
  printf("%.9lf\n", mid);
  return 0;
}
