#include<bits/stdc++.h>

using namespace std;
#define X first
#define Y second
#define pb push_back
typedef double db;
typedef long long ll;
typedef pair<ll,db> P;
const int MAXN=5e5+10;
db res=0;ll all;
int n,L,l=0,r=-1,top;P q[MAXN];

int main()
{
    scanf("%d%d",&n,&L);
    for(int i=1;i<=n;i++)
    {
        db t;ll v;scanf("%lf%lld",&t,&v);
        while(all+v>L)
        {//按温度从小到大放水
            ll d=min(q[l].X,all+v-L);
            q[l].X-=d;all-=d;res-=d*q[l].Y;
            if(!q[l].X) l++;
        }
        all+=v;res+=v*t;
        
        while(l<=r&&t<q[r].Y)
        {//
            t=(v*t+q[r].X*q[r].Y)/(v+q[r].X);
            v+=q[r].X;r--;
        }
        q[++r]=P(v,t);
        printf("%.6lf\n",res/L);
    }
    return 0;
}