


Given a N * N matrix and the task is to check matrix is idempotent matrix or not.
See the sample input.
Idempotent matrix M follows the following property :
M*M = M
Line 1 : Size N of the matrix
Line 2 to N + 1 : NXN elements of the matrix
Output Format :
true or false
1 <= N <= 10^3
3
2 -2 -4
-1 3 4
1 -2 -3
true