#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)   FOR(i,0,n)
#define pb emplace_back
typedef long long ll;
typedef pair<int,int> pint;

pint a[105];
int ans[105];
int main(){
    int n,w,d,p,s;
    while(cin>>n>>w>>d,n|w|d){
        a[0]={w,d};
        int cnt=1;
        rep(i,n){
            cin>>p>>s;
            --p;
            pint c=a[p];
            s%=c.first+c.second;
            if(s<c.first){
                a[cnt]={min(s,c.first-s),c.second};
                ++cnt;
                a[cnt]={max(s,c.first-s),c.second};
            }
            else{
                s-=c.first;
                a[cnt]={c.first,min(s,c.second-s)};
                ++cnt;
                a[cnt]={c.first,max(s,c.second-s)};
            }
            FOR(i,p,cnt) a[i]=a[i+1];
        }
        rep(i,cnt) ans[i]=a[i].first*a[i].second;
        sort(ans,ans+cnt);
        rep(i,cnt) cout<<ans[i]<<(i==cnt-1?"":" ");
        cout<<endl;
    }
    return 0;
}

