



from itertools import compress, repeat
from math import ceil, sqrt



def __lowerCAmelCase       (   SCREAMING_SNAKE_CASE_     ):

			if num <= 2:
						return []
			if num == 3:
						return [2]

			# Odd sieve for numbers in range [3, num - 1]
			lowercase__         = bytearray(B"\x01"     ) * ((num >> 1) - 1)

			for i in range(3  ,     int(sqrt(SCREAMING_SNAKE_CASE__     )     ) + 1  ,     2     ):
						if sieve[(i >> 1) - 1]:
									lowercase__         = i**2
									lowercase__         = repeat(
									    0  ,     ceil((num - i_squared) / (i << 1)     )     )

			return [2] + list(compress(range(3  ,     SCREAMING_SNAKE_CASE__  ,     2     )  ,     SCREAMING_SNAKE_CASE__     )     )


if __name__ == "__main__":
							import doctest

							doctest.testmod()








from __future__ import annotations
def       UpperCamelCase__     (  SCREAMING_SNAKE_CASE__			,       SCREAMING_SNAKE_CASE__			,       SCREAMING_SNAKE_CASE__			,       SCREAMING_SNAKE_CASE__						):
 __lowerCamelCase					,     __lowerCamelCase		:							str							=						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       UpperCamelCase__     (  ):
 __lowerCamelCase		:							List[Any]							=						[[2, 5, 7], [4, 8, 13], [9, 11, 15], [12, 17, 20]]
 __lowerCamelCase		:							int							=						int(input('Enter the element to be searched:'						)						)
 print(SCREAMING_SNAKE_CASE__						)
 search_in_a_sorted_matrix(SCREAMING_SNAKE_CASE__			,       len(SCREAMING_SNAKE_CASE__						)			,       len(mat[0]						)			,       SCREAMING_SNAKE_CASE__						)


if __name__ == "__main__":
       import doctest

       doctest.testmod()
       main()

