E. Kozak Vus and the Matrix
As the New Year approaches, Cossack Vus has devised a new challenge for the olympiad participants.
You are given a matrix with dimensions (meaning it has rows and columns).
A matrix is defined as "good" if the sum of the elements in each row and each column is the same.
You are allowed to alter the matrix by selecting any single element and multiplying it by any number (including , negative numbers, or non-integers).
Your task is to determine if it is possible to make the matrix good with exactly one such modification.
Input
The first line contains two integers and () — representing the number of rows and columns in the matrix.
Each of the following lines contains integers () — these are the elements of the matrix.
Output
Print "Yes" if it is possible to make the matrix good with exactly one change; otherwise, print "No".
Examples
Note
In the second test case, you can, for instance, multiply the first element of the first row by . The matrix then becomes:
In the fourth test case, you can multiply the first element of the second row by . The matrix then becomes:
In the first and third test cases, you can verify that no single operation can make the matrix good.