#include<stdio.h>
void cut(int,int,int);
int x[1000],y[1000];
int main(void){
    int su[1000];
    int n,w,d;
    int p,s;
    int i,j;
    int t;
    
    scanf("%d %d %d",&n,&w,&d);
    while(n+w+d!=0){
        //printf("n=%d w=%d d=%d\n",n,w,d);
        x[1]=w;
        y[1]=d;
        for(i=1;i<=n;i++){
            scanf("%d %d",&p,&s);
            cut(p,s,i);
        }
        for(i=1;i<=n+1;i++)   su[i]=x[i]*y[i];
        
        for(i=1;i<=n;i++){
            for(j=i+1;j<=n+1;j++){
                if(su[i]>su[j]){
                    t=su[i];
                    su[i]=su[j];
                    su[j]=t;
                }
            }
        }
        for(i=1;i<=n+1;i++)   printf("%d ",su[i]);
        printf("\n");
        scanf("%d %d %d",&n,&w,&d);   
    }
    
    return 0;
}
void cut(int p,int s,int n){
    int xp,yp;
    int i,j;
    
    xp=x[p];
    yp=y[p];
    
    for(i=p;i<=n-1;i++){
        x[i]=x[i+1];
        y[i]=y[i+1];
    }
    s=s%(xp+yp);
    if(s<xp){
        y[n]=y[n+1]=yp;
        if(s<xp-s){
            x[n]=s;
            x[n+1]=xp-s;
        }
        else{
            x[n+1]=s;
            x[n]=xp-s ;
        }
    }
    else{
        s-=xp;
        x[n]=x[n+1]=xp;
        if(s<yp-s){
            y[n]=s;
            y[n+1]=yp-s;
        }
        else{
            y[n+1]=s;
            y[n]=yp-s; 
        }
        
    }
}