시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB33831127793.266%

문제

The Jewish holiday of Chanukah lasts for eight days and eight nights. On the evening before each day, candles are lit in a menorah. On the first evening, one candle is lit, on the second, two are lit, and so on. However, each evening, an extra candle, called the shammas, is also lit (in fact, this candle is used to light the other candles). Thus, for the entire holiday, 44 candles are necessary.

But what if Chanukah lasted a different number of days? How many candles would be needed?

For this problem, you will write a program that determines how many candles would be necessary for a Chanukah holiday lasting for a given number of days.

입력

The first line of input contains a single decimal integer P, (1 ≤ P ≤ 10000), which is the number of data sets that follow. Each data set should be processed identically and independently.

Each data set consists of a single line of input. It contains the data set number, K, followed by a single space, followed by a single decimal integer N, (1 ≤ N ≤ 10000), which gives the number of days to assume for the holiday.

출력

For each data set there is one line of output. The single output line consists of the data set number, K, followed by a space followed by the number of candles needed for an N-day Chanukah holiday.

예제 입력 1

3
1 8
2 1
3 10

예제 출력 1

1 44
2 2
3 65