#include <iostream>
#include <vector>
#include <algorithm>

#define MAX 103
using namespace std;


int main()
{
	int n, w, d, wi[MAX], di[MAX];
	while (cin >> n >> w >> d, n || w || d){

		fill(wi, wi + MAX, 0);
		fill(di, di + MAX, 0);
		wi[0] = w;
		di[0] = d;

		for (int i = 0; i < n; i++){
			int p, s,w1,d1,w2,d2;
			cin >> p >> s;
			p--;
			s = s % (wi[p] + di[p] + wi[p] + di[p]);

			if (s < wi[p]){
				w1 = s;
				d1 = di[p];
				w2 = wi[p] - w1;
				d2 = d1;
			}
			else if (s < wi[p] + di[p]){
				w1 = wi[p];
				d1 =  s - wi[p];
				w2 = w1;
				d2 = di[p] - d1;
			}
			else if (s < wi[p] + di[p] + wi[p]){
				w1 = s - di[p] - wi[p];
				d1 = di[p];
				w2 = wi[p] - w1;
				d2 = d1;
			}
			else{
				w1 = wi[p];
				d1 = s - wi[p] - di[p] - wi[p];
				w2 = w1;
				d2 = di[p] - d1;
			}

			for (int j = p; j < i; j++){
				wi[j] = wi[j + 1];
				di[j] = di[j + 1];
			}

			if (w1*d1 < w2*d2){
				wi[i] = w1;
				di[i] = d1;
				wi[i + 1] = w2;
				di[i + 1] = d2;
			}
			else{
				wi[i] = w2;
				di[i] = d2;
				wi[i + 1] = w1;
				di[i + 1] = d1;

			}


		}
		vector<int>ans;
		



		for (int i = 0; i < n+1; i++){
			ans.push_back(wi[i] * di[i]);
		}
		sort(ans.begin(), ans.end());
		for (int i = 0; i < n; i++)
			cout << ans[i] << " ";
		cout << ans[n] << endl;
	
	}
	return 0;
}