In a busy port, a large number of containers need to be stacked on the deck of cargo ships every day. For convenience, you can consider both the deck and the containers as rectangles parallel to the coordinate axes. The deck is a large rectangular area with the lower left corner at $$$(0,0)$$$ and the upper right corner at $$$(l,h)$$$.
You are a container scheduler and need to arrange the position of each container on the deck. In theory, you need to schedule it reasonably to maximize space utilization. However, you feel that you are underpaid, so you want to be lazy in the scheduling method. The scheduling method you provide is as follows:
There are a total of $$$n$$$ containers, and for each container, the length along the $$$x$$$ axis and the width along the $$$y$$$ axis are given in order. Your task is to determine whether each container can be placed, and if so, provide the position of its lower left corner.
The first line contains three integers $$$n,l,h$$$ ($$$1 \le n \le 50$$$, $$$1 \le l,h \le 10^9$$$), representing the number of containers and the length and width of the deck area, respectively.
The next $$$n$$$ lines each contain two integers $$$x,y$$$ ($$$1 \le x,y \le 10^9$$$), representing the length along the $$$x$$$ axis and the width along the $$$y$$$ axis of each container.
For each container in order, output the coordinates of its lower left corner separated by a space if the container can be placed. Otherwise, output $$$-1$$$.
4 10 10 5 5 6 6 4 7 10 2
0 0 -1 5 0 0 7
| Name |
|---|


