


'''simple docstring'''



from __future__ import annotations

from bisect import bisect_left
from functools import total_ordering
from heapq import merge






@total_ordering
class 					UpperCAmelCase__	(		__UpperCAmelCase ):



					def __lt__(    self			,				UpperCamelCase     )     ->			List[str]:
						return self[-1] < other[-1]



					def __eq__(    self			,				UpperCamelCase     )     ->			Union[str, Any]:
						return self[-1] == other[-1]



def   __lowerCAmelCase					(							lowerCamelCase   :						Dict					):






	'''simple docstring'''




	__lowerCAmelCase												=  []
	# sort into stacks
	for element in collection:
		__lowerCAmelCase												=  Stack([element]					)
		__lowerCAmelCase												=  bisect_left(_UpperCAmelCase				,		_UpperCAmelCase					)
		if i != len(_UpperCAmelCase					):
			stacks[i].append(_UpperCAmelCase					)
		else:
			stacks.append(_UpperCAmelCase					)

    # use a heap-based merge to merge stack efficiently
	__lowerCAmelCase												=  merge(*(reversed(_UpperCAmelCase					) for stack in stacks)					)
	return collection


if __name__ == "__main__":
	lowerCAmelCase	:		str				=   input('''Enter numbers separated by a comma:\n''').strip()
	lowerCAmelCase	:		Union[str, Any]				=   [int(item) for item in user_input.split(''',''')]
	print(patience_sort(unsorted))




'''simple docstring'''



import re



def   __lowerCAmelCase					(							lowerCamelCase   :						str					):






	'''simple docstring'''




	__lowerCAmelCase												=  re.compile(
	    r"^(?:0|94|\+94|0{2}94)" r"7(0|1|2|4|5|6|7|8)" r"(-| |)" r"\d{7}$"					)

	return bool(re.search(lowerCamelCase				,		lowerCamelCase					)					)


if __name__ == "__main__":
	lowerCAmelCase	:		Optional[Any]				=   '''0094702343221'''

	print(is_sri_lankan_phone_number(phone))