





'''simple docstring'''


class       UpperCamelCase__  :  # Public class to implement a graph







	def __init__(				self			:   Union[str, Any] , lowerCamelCase			:   int , lowerCamelCase			:   int , lowerCamelCase			:   list[list[bool]]		):




				'''simple docstring'''
				a__     = row
				a__     = col
				a__     = graph







	def 						__a   (				self			:   str , lowerCamelCase			:   int , lowerCamelCase			:   int , lowerCamelCase			:   list[list[bool]]		):




				'''simple docstring'''
				return (
				    0 <= i < self.ROW
				    and 0 <= j < self.COL
				    and not visited[i][j]
				    and self.graph[i][j]
				)







	def 						__a   (				self			:   int , lowerCamelCase			:   int , lowerCamelCase			:   int , lowerCamelCase			:   list[list[bool]]		):




				'''simple docstring'''
				a__     = [-1, -1, -1, 0, 0, 1, 1, 1]  # Coordinate order
				a__     = [-1, 0, 1, -1, 1, -1, 0, 1]
				a__     = True  # Make those cells visited
				for k in range(8		):
							if self.is_safe(i + row_nbr[k] , j + col_nbr[k] , lowerCamelCase		):
										self.diffs(i + row_nbr[k] , j + col_nbr[k] , lowerCamelCase		)







	def 						__a   (				self			:   int		):  # And finally, count all islands.




				'''simple docstring'''
				a__     = [[False for j in range(self.COL		)] for i in range(self.ROW		)]
				a__     = 0
				for i in range(self.ROW		):
							for j in range(self.COL		):
										if visited[i][j] is False and self.graph[i][j] == 1:
													self.diffs(lowerCamelCase , lowerCamelCase , lowerCamelCase		)
													count += 1
				return count












'''simple docstring'''


import re







def    _lowerCamelCase  (__lowerCamelCase  :     str     )   ->    bool:
			a__     = 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_   :   Any       =					"0094702343221"

		print(is_sri_lankan_phone_number(phone))



