After Wodex getting brave sword, he embarked on a journey of revenge finally.
But he realized it would be hard to combat Zero. So he needed to expanded his power. How to do it?
He decided to buy some lands to as his base. The landlord had some lands, each land had its own length and width. The price of each land was its area. But there was a discount. If Wodex bought many lands for only one time, the price would be the maximum of these lands' length multiply the maximum of these lands' width.
But Wodex was so clever, he would buy all lands for many times to cost less.
Do you know how to cost less to get all lands? You can not exchange of the land's length and its width.
Output the minimum cost of Wodex.