



"""simple docstring"""





from math import atan, cos, radians, sin, tan

from .haversine_distance import haversine_distance

lowerCamelCase  			=		6_378_137.0
lowerCamelCase  			=		6_356_752.314_245
lowerCamelCase  			=		6_378_137
def   a__      ( lowerCAmelCase__      ,     lowerCAmelCase__      ,     lowerCAmelCase__      ,     lowerCAmelCase__ ):
      UpperCAmelCase_     					=				(AXIS_A - AXIS_B) / AXIS_A
      # Parametric latitudes
      # https://en.wikipedia.org/wiki/Latitude#Parametric_(or_reduced)_latitude
      UpperCAmelCase_     					=				atan((1 - flattening) * tan(radians(lowerCAmelCase__ ) ) )
      UpperCAmelCase_     					=				atan((1 - flattening) * tan(radians(lowerCAmelCase__ ) ) )

      # Compute central angle between two points
      # using haversine theta. sigma =  haversine_distance / equatorial radius
      UpperCAmelCase_     					=				haversine_distance(lowerCAmelCase__      ,     lowerCAmelCase__      ,     lowerCAmelCase__      ,     lowerCAmelCase__ ) / EQUATORIAL_RADIUS

      # Intermediate P and Q values
      UpperCAmelCase_     					=				(b_lata + b_lata) / 2
      UpperCAmelCase_     					=				(b_lata - b_lata) / 2

      # Intermediate X value
      # X = (sigma - sin(sigma)) * sin^2Pcos^2Q / cos^2(sigma/2)
      UpperCAmelCase_     					=				(sin(lowerCAmelCase__ ) ** 2) * (cos(lowerCAmelCase__ ) ** 2)
      UpperCAmelCase_     					=				cos(sigma / 2 ) ** 2
      UpperCAmelCase_     					=				(sigma - sin(lowerCAmelCase__ )) * (x_numerator / x_demonimator)

      # Intermediate Y value
      # Y = (sigma + sin(sigma)) * cos^2Psin^2Q / sin^2(sigma/2)
      UpperCAmelCase_     					=				(cos(lowerCAmelCase__ ) ** 2) * (sin(lowerCAmelCase__ ) ** 2)
      UpperCAmelCase_     					=				sin(sigma / 2 ) ** 2
      UpperCAmelCase_     					=				(sigma + sin(lowerCAmelCase__ )) * (y_numerator / y_denominator)

      return EQUATORIAL_RADIUS * (sigma - ((flattening / 2) * (x_value + y_value)))


if __name__ == "__main__":
  import doctest

  doctest.testmod()








"""simple docstring"""




from collections import defaultdict





def       a_ (	lowercase__ :int     ):
			__lowerCamelCase          =      1
			__lowerCamelCase          =      True
			for v in tree[start]:
						if v not in visited:
									ret += dfs(lowercase__     )
			if ret % 2 == 0:
						cuts.append(lowercase__     )
			return ret





def       a_ (	):
			dfs(1     )


if __name__ == "__main__":
					__magic_name__  , __magic_name__						: Tuple    =				1_0, 9
					__magic_name__						: Tuple    =				defaultdict(list)
					__magic_name__						: dict[int, bool]    =				{}
					__magic_name__						: list[int]    =				[]
					__magic_name__						: List[str]    =				0
					__magic_name__						: Tuple    =				[(2, 1), (3, 1), (4, 3), (5, 2), (6, 1), (7, 2), (8, 6), (9, 8), (1_0, 8)]
					for u, v in edges:
										tree[u].append(v)
										tree[v].append(u)
					even_tree()
					print(len(cuts) - 1)




