You are given a rectangular cake with integer dimensions w×h. Divide the cake into m rectangular pieces, each with integer dimensions, so that the area of the largest piece is as small as possible. Every cut must be a straight line parallel to one of the sides of the cake, and it must split a single existing piece into two pieces, each of positive area. Because each cut splits exactly one piece into two, dividing the cake into m pieces requires exactly m−1 cuts.
The input contains several test cases. Each test case is a line with three integers w, h, and m separated by single spaces, where 1≤w,h,m≤20 and m≤wh. The line w=h=m=0 marks the end of the input and must not be processed.
For each test case, print a single line containing one positive integer: the minimum possible area of the largest piece.
When w=4, h=4, and m=4, the following cuts minimize the area of the largest piece:

When w=4, h=4, and m=3, the following cuts are optimal:
