2022 G.W. Coding Contest 1 S1: Semimagic Squares:
Magic squares are grids with the numbers in each column, each row, and each corner-to-corner diagonal adding up to the same total.
However, a semi-magic square is a magic square, but with any diagonal adding up to a different sum.
Given the length and width \(N\) of a grid, and the grid of numbers, print "yes" if the square is semi-magic, and print "no" if it is not.
Sample Input:
Sample Output:
Submit Solution