def checkSymmetric(matrix) :
rows = len(matrix)
cols = len(matrix[0])
if (rows != cols) :
return False
i = 0
while (i < rows) :
j = 0
while (j < cols) :
if (matrix[i][j] != matrix[j][i]) :
return False
j += 1
i += 1
return True
matrix = [[1, 5, 2, 4],
[5, 6, 3, 7],
[2, 3, 9, 0],
[4, 7, 0, 8]]
if (checkSymmetric(matrix)) :
print("yes", end ="")
else :
print("no", end ="")
'''
run:
yes
'''