Identical Matrices
##### *School Problem's Submission isn't counted in score!

Write a program to check whether two matrices are identical or not.

Input:
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test contains an integer N denoting the size of the square matrix. Then the two square matrix of size N*N is taken as input with space separating integers.

Output:
Print "Yes" (without quotes) if matrices are identical and "No" if not identical.

Constraints:
1<=T<=1000
1<=N<=20
1<=a[i][j]<=1000
1<=b[i][j]<=1000

Example:
Input:

2
4
1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4
1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4
2
1 2 3 4
3 4 2 1

Output:
Yes
No

#### ** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Ayush Govil
Author: Ayush Govil 1

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.