You must have tried to solve the Rubik’s cube. You might even have succeeded at it. Rubik’s cube is a 3x3x3 cube which has 6 different color for each face.The Rubik’s cube is made from 26 smaller pieces which are called cubies. There are 6 cubies at the centre of each face and these comprise of a single color. There are 8 cubies at the 8 corners which comprise of exactly 3 colors. The 12 reamaining cubies comprise of exactly 2 colors.

Apple has come up with a variation of the Rubik’s Cube, it’s the Rubik’s cuboid which has different colors on its 6 faces. The Rubik’s Cuboid comes in various sizes represented by M x N x O (M,N,O are natural numbers). Apple is giving away 100 Rubik’s cuboid for free to people who can answer a simple questions. Apple wants to know, in a Rubik’s cuboid with arbitrary dimensions, how many cubies would be there, which comprise of exactly 2 color.

-----Input-----
The input contains several test cases.The first line of the input contains an integer T denoting the number of test cases.

Each test case comprises of 3 natural numbers, M,N & O, which denote the dimensions of the Rubiks Cuboid.

-----Output-----
For each test case you are required to output the number of  cubies which comprise of 2 squares, each of which is of a different color.

-----Constraints-----
- 1 ≤ T ≤ <1000
- 1 ≤ M ≤ <100000
- 1 ≤ N ≤ <100000
- 1 ≤ O ≤ <100000

-----Example-----
Input:
1
3
3
3

Output:

12

Source: codechef | Difficulty: UNKNOWN_DIFFICULTY


Solutions:
for _ in range(int(input())):
	m = int(input())
	n = int(input())
	o = int(input())
	ans = 4 * (m + n + o) - 24
	if ans <= 0:
		print('0')
	else:
		print(ans)


import sys
for __ in range(eval(input())):
	(m, n, o) = (eval(input()), eval(input()), eval(input()))
	if m == 1 and n == 1 and (o == 1):
		print(0)
		continue
	print((m - 2) * 4 + (n - 2) * 4 + (o - 2) * 4)


for tt in range(eval(input())):
	m = eval(input())
	n = eval(input())
	o = eval(input())
	if m == 1 and n == 1 and (o == 1):
		print('0')
		continue
	if m != 1 and n != 1 and (o != 1):
		ans = abs(4 * (m - 2) + 4 * (n - 2) + 4 * (o - 2))
		print(ans)
	elif m == 1 and n > 1 and (o > 1):
		ans = n * o - (2 * n + 2 * (o - 2))
		print(ans)
	elif n == 1 and m > 1 and (o > 1):
		ans = m * o - (2 * m + 2 * (o - 2))
		print(ans)
	elif o == 1 and m > 1 and (n > 1):
		ans = m * n - (2 * m + 2 * (n - 2))
		print(ans)


from sys import stdin, stdout
t = int(stdin.readline())
while t:
	t -= 1
	m = int(stdin.readline())
	n = int(stdin.readline())
	o = int(stdin.readline())
	if m > 2 and n > 2 and (o > 2):
		ans = 4 * (m + n + o - 6)
	elif m == 1 or n == 1 or o == 1 or (m == 2 and n == 2 and (o == 2)):
		ans = 0
	else:
		ans = m - 2 if m > 2 else 0
		ans += n - 2 if m > 2 else 0
		ans += o - 2 if m > 2 else 0
	stdout.write(str(ans) + '\n')


for t in range(int(input())):
	m = int(input())
	n = int(input())
	o = int(input())
	if m == 1 and (n == 1 and o == 1):
		print(0)
	else:
		print((m + n + o - 6) * 4)


for _ in range(int(input())):
	a = int(input())
	b = int(input())
	c = int(input())
	if a == 1 or b == 1 or c == 1:
		print(0)
	else:
		print(4 * (a + b + c - 6))