Roll the Dice

fire_tornado, fsshakkhor VU CSE Tech Fest 2019 Pro...
Limits 1s, 512 MB

You have got a 6 sided dice. In a single roll, it may show any integers from 1 to 6. You are going to roll it exactly N times. In each roll, the integer shown on the top face of the dice will be added to your points.

You have to find out, what is the maximum and minimum number of points you can achieve after throwing the dice for exactly N times.

Input

The first line contains an integer T (1 ≤ T ≤ 20), denoting the number of test cases.

Each of the next T lines will contain an integer N (0 ≤ N ≤ 20).

Output

For each test case, print two integers separated by a space. These two integers represent the maximum and the minimum points you can earn by rolling the dice exactly N times.

Sample

InputOutput
1
2
12 2

Submit

Login to submit.

Statistics

98% Solution Ratio
vector94Earliest, Dec '19
vector94Fastest, 0.0s
vector94Lightest, 0 B
bokaifShortest, 41B
Toph uses cookies. By continuing you agree to our Cookie Policy.