


from __future__ import annotations



def       lowerCAmelCase			(		lowerCAmelCase_			, lowerCAmelCase_			, lowerCAmelCase_			, lowerCAmelCase_			)->			None:
				lowerCAmelCase_			:   Dict     					=					m - 1, 0
				while i >= 0 and j < n:
								if key == mat[i][j]:
												print(f"""Key {key} found at row- {i + 1} column- {j + 1}"""			)
												return
								if key < mat[i][j]:
												i -= 1
								else:
												j += 1
				print(f"""Key {key} not found"""			)



def       lowerCAmelCase			(		)->			None:
				lowerCAmelCase_			:   Dict     					=					[[2, 5, 7], [4, 8, 13], [9, 11, 15], [12, 17, 20]]
				lowerCAmelCase_			:   Dict     					=					int(input('''Enter the element to be searched:'''			)			)
				print(__UpperCAmelCase			)
				search_in_a_sorted_matrix(__UpperCAmelCase			, len(__UpperCAmelCase			)			, len(mat[0]			)			, __UpperCAmelCase			)


if __name__ == "__main__":
						import doctest

						doctest.testmod()
						main()
'''simple docstring'''
from __future__ import annotations

import math
import random







def 				__UpperCamelCase (					__UpperCAmelCase  :					int ,   __UpperCAmelCase  :					int ,   __UpperCAmelCase  :					int			)							->	list[int]:
  lowercase				:							Union[str, Any]									=   d * e - 1
  lowercase				:							List[str]									=   0
  lowercase				:							Tuple									=   0
  while p == 0:
    lowercase				:							Optional[Any]									=   random.randint(2 ,   n - 1			)
    lowercase				:							Dict									=   k
    while True:
      if t % 2 == 0:
        lowercase				:							List[Any]									=   t // 2
        lowercase				:							Union[str, Any]									=   (g**t) % n
        lowercase				:							Optional[Any]									=   math.gcd(x - 1 ,   __UpperCAmelCase			)
        if x > 1 and y > 1:
          lowercase				:							Dict									=   y
          lowercase				:							Any									=   n // y
          break  # find the correct factors
      else:
        break  # t is not divisible by 2, break and choose another g
  return sorted([p, q]			)


if __name__ == "__main__":
 import doctest

 doctest.testmod()