Virat Kohli is fond of matrices. He has played a total of M*N matches so far and has kept record of all the scores in a score matrix of size M*N. He also loves to score a perfect hundred and calls a matrix a century matrix if all it's elements are 100. He wants to transform his score matrix to a century matrix of same size. To do this, he wants to performs a finite number of operations on his matrix. The single operation involves adding any integer to two adjacent cells in the matrix so as to try to convert it into century matrix. He is going to play in world cup and wants you to figure out if it is possible to transform his score matrix into century matrix.
Two cells are said to be adjacent if they share a common side.
The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows:
The first line of each test case contains two integers M,N. Next M lines will contain N space-separated integers denoting the score of Virat Kohli.
Output For each test case, print "YES" if transformation is possible, else print "NO". (without quotes)