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
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)

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)
