Chanukah Candles

Each evening needs one more candle than the last plus one shammas, so for N days compute N(N+1)/2 + N.

Easy1MathImplementationNo attempts yetTime limit2sMemory limit512 MB

Problem

The Jewish holiday of Chanukah lasts for eight days. Candles are lit in a menorah on each evening: one candle on the first evening, two on the second, and one more each evening after that. On top of that, one extra candle called the shammas is lit every evening. That candle is the one used to light the others. The full eight day holiday therefore needs 44 candles.

How many candles would a holiday of a different length need? Write a program that computes the number of candles needed for a holiday lasting NN days.

Input

The first line contains the number of data sets PP (1P100001 \le P \le 10000). Each of the next PP lines holds one data set, and every data set is processed the same way and independently of the others.

Each line contains the data set number KK, a single space, and the number of days NN of the holiday (1N100001 \le N \le 10000).

Output

Print one line for each data set. The line contains the data set number KK, a single space, and the number of candles needed for an NN day Chanukah holiday.