In Chefland, there is a very famous street where N types of street food (numbered 1 through N) are offered. For each valid i, there are Si stores that offer food of thei-th type, the price of one piece of food of this type is Vi(the same in each of these stores) and each day, Pi people come to buy it; each of these people wants to buy one piece of food of the i-th type.

Chef is planning to open a new store at this street, where he would offer food of one of these N

types. Chef assumes that the people who want to buy the type of food he'd offer will split equally among all stores that offer it, and if this is impossible, i.e. the number of these people p is not divisible by the number of these stores s, then only [p/s] people will buy food from Chef.

Chef wants to maximise his daily profit. Help Chef choose which type of food to offer and find the maximum daily profit he can make.

Input

1.The first line of the input contains a single integer T
denoting the number of test cases.

2.The description of T lines follow. For each i (1iN),

3.the i-th of these lines contains three space-separated integers Si, Pi and Vi.
Output

For each test case, print a single line containing one integer ― the maximum profit.

Constraints:

• 1T100
• 1N100
• 1Si,Vi,Pi10,000 for each valid i

Example Input

2
3
4 6 8
2 6 6
1 4 3
1
7 7 4
Example Output

12
0
Explanation

Example case 1: Chef should offer food of the second type. On each day, two people would buy from him, so his daily profit would be 12

.
Example case 2: Chef has no option other than to offer the only type of food, but he does not expect anyone to buy from him anyway, so his daily profit is 0

2. Dude at least try to make it look like its not taken directly from a textbook, anyways the tasks are there for you to LEARN from, posting code you already made to get help bug fixing is fine but fobbing off the entirety of the task without even trying to do it yourself is just shooting yourself in the foot.

3. The last thing we need here are a stream of codechef wannabies dumping their zero effort homework.

@OP, start a new thread with some actual code of your own if you want to learn something.
And no, code you "find" using google won't count, and we can usually tell.