#include <bits/stdc++.h>

using namespace std;

bool cmp(pair<int,int> a, pair<int,int> b) {
  return a.first*a.second<b.first*b.second;
}

int main(){
  int n,w,d;
  while(cin >> n >> w >> d, w) {
    vector<pair<int,int> > cakes;
    cakes.push_back(make_pair(w,d));
    while(n--) {
      int p,s; cin >> p >> s; --p;
      int nw=cakes[p].first,nd=cakes[p].second;
      cakes.erase(cakes.begin()+p);
      s%=nw+nd;
      pair<int,int> p1,p2;
      if(s<nw) {
	p1=make_pair(s,nd);
	p2=make_pair(nw-s,nd);
      } else {
	p1=make_pair(nw,s-nw);
	p2=make_pair(nw,nd-(s-nw));
      }
      if(p1.first*p1.second<p2.first*p2.second) {
	cakes.push_back(p1); cakes.push_back(p2);
      } else {	
	cakes.push_back(p2); cakes.push_back(p1);
      }
    }
    sort(cakes.begin(),cakes.end(),cmp);
    for(int i=0;i<cakes.size();++i) {
      if(i) cout << " ";
      cout << cakes[i].first*cakes[i].second;
    }
    cout << endl;
  }
  
  return 0;
}

