Charlotte went on holidays to Machu Picchu and took a picture that wants to frame to hang it on the wall. Naturally, she wants a frame big enough to contains her picture, but also wants that it is not bigger than necessary. Specifically, she wants to minimize the area of a frame. The picture as well as the frame are rectangles which dimensions are described by two natural numbers. Write an algorithm that finds, given a sequence of frames, the area of the smallest frame in which fits the picture.
For instance, if the picture measures and there are three frames with dimensions , , and , Charlotte would choose the last frame. The second one is too small, and the other frames the first one is the biggest (, compared with ).
Each case of the input starts with two natural numbers and describing the dimensions of the picture. Then, a number of frames in the shop follows, and lines with two natural numbers and in each one, describing the dimensions of each frame. The input may contain various cases, separated between them by a line in white; your program must detect when the cases finish.
For each case, your program must print the area of the smallest frame in which the picture fits. If it does not fit in any frame, it must print .
Author: Anders Jonsson
Input
7 11 3 9 12 6 15 13 8
Output
104
Input
200 450 4 500 300 180 450 450 400 250 650 10 10 1 20 20 3 3 0 10 20 1 20 10
Output
150000 400 -1 200