Gather sand to form a tower is a Chinese idiom, whose Pinyin is

. It means to pile sand into a pagoda, referring that a little makes a lot. From the
fahua Sutra - convenience products.
Suppose the tower has

floors. There are

rooms on the

floor. Each room can accommodate

people. How many people can the

floor tower accommodate?
输入描述:
The first line is a positive integer
, indicating that there are
test data.
Next, there are
lines. Each line has two positive integers
and
, indicating the number of floors of the tower and the number of people that can be accommodated in each room in a test data.
输出描述:
Each test data outputs a line containing one positive integer, that is, the total number of people that can be accommodated in the
floor tower.