#include <cstdio>

const int maxn = 5e5 + 10;

int n, m, fnt, rar, s, x[maxn];
double ans, y[maxn];

int main() {
	scanf("%d%d", &n, &m);
	for (int i = 1; i <= n; ++i) {
		int t, v;
		scanf("%d%d", &t, &v);
		while(fnt < rar && s - x[fnt] >= m - v) {
			ans -= y[fnt];
			s -= x[fnt++];
		}
		if(s > m - v) {
			ans -= y[fnt];
			y[fnt] -= (s - m + v) * y[fnt] / x[fnt];
			ans += y[fnt];
			x[fnt] -= (s - m + v);
		}
		s = m;
		double k = 1. * t * v;
		ans += k;
		while(fnt < rar && y[rar - 1] * v >= k * x[rar - 1]) {
			v += x[--rar];
			k += y[rar];
		}
		x[rar] = v;
		y[rar++] = k;
		printf("%.12f\n", ans / m);
	}
	return 0;
}