Determinant

Consider a 3x3 matrix
M = a00 a01 a02
a10 a11 a12
a20 a21 a22
The determinant of M can be calculated by
det(M) = a00 * a11 * a22 + a01 * a12 * a20 + a02 * a10 * a21 - a20 * a11 * a02 - a21 * a12 * a00 - a22 * a10 * a01.

Write a program to read the 9 entities of the matrix, and calculate its determinant.


The program may run as follows.

Please input a 3x3 matrix to calculate its determinant --
1 5 3
2 4 7
4 6 2
Its determinant is equal to 74