-----Description-----  
The task is to search for a specific integer in a 2D array where the rows and columns are sorted in non-decreasing order. The goal is to locate the key and return its position as row and column indices, or return (-1, -1) if the algorithm fails to find the key.

-----Input-----  
The input consists of:  
• a: A non-empty 2D array of integers (Array (Array Int)). The array is guaranteed to contain at least one element.
• key: An integer value (Int) to search for in the array.

-----Output-----  
The output is a pair of integers (Int × Int):  
• If the key is found, the first element represents the row index and the second element represents the column index such that get2d a row col = key.  
• If the key is not found, the function returns (-1, -1).

-----Note-----  
It is assumed that the input 2D array is sorted by rows and columns.
