Problem1243--rich bro.kun(4)

1243: rich bro.kun(4)

[Creator : ]
Time Limit : 1 sec  Memory Limit : 128 MB

Description

The last three problems had said that bro.kun was wealthy.In the senior three,bro.kun apply to take part in postgraduate entrance examination.One day,he meet a problem about determinant.So he need your help.

Input

multi group test,the first line input an integer N represent the rank of determinant.(N=2,3)

then input N line,each line have N integer.(0-100)

Output

for multi group test,output the result of determinant.

Sample Input Copy

2
1 2
2 3
3
1 2 3
0 0 0
1 2 1

Sample Output Copy

-1
0

Source/Category