Alok wants Sunny to create a board game for him. Sunny decides to create a board game with board size N x M. Each cell on the board has a value associated with it. Player can choose any cell on the board to start with. Each player can move either to the right or down. A player can:
The player who determines most number of positions that can be occupied with rules mentioned above fastest wins. Now, Alok wants to impress shivangi and wants to determine the number of cells that he can start with such that he can occupy maximum number of cells on the board. Can you help alok in impressing shivangi ?
First line of input contains a single integer T denoting the number of test cases. First line of each test case contains 2 space separated integers N and M denoting the size of the board. Next N lines contains M space separated integers where jth number in the ith row denotes value of celli,j.
For each test case, Print 2 space separated answer i.e the maximum number of cells that can be occupied and the number of cells alok can start with to occupy maximum number of cells on the board.
Sample Test 1: Alok can start with cell [1, 1] and can move towards right to the cell [1, 2], then move down to the cell [2, 2] and then move towards right to the cell [2, 3]. Therefore, he can occupied 4 cells and there is only cell i.e [1, 1] that he can start with to occupy maximum number of cells.