
"""simple docstring"""







from math import radians as angle_to_radians
from math import sin

# Acceleration Constant on Earth (unit m/s^2)
lowerCamelCase__     =						9.8_0_6_6_5
def        __lowerCAmelCase							(_UpperCamelCase			,    _UpperCamelCase						):

	# Ensure valid instance
	if not isinstance(_UpperCamelCase			,    (int, float)						):
		raise TypeError('Invalid velocity. Should be a positive number.'						)

	if not isinstance(_UpperCamelCase			,    (int, float)						):
		raise TypeError('Invalid angle. Range is 1-90 degrees.'						)

	# Ensure valid angle
	if angle > 90 or angle < 1:
		raise ValueError('Invalid angle. Range is 1-90 degrees.'						)

	# Ensure valid velocity
	if init_velocity < 0:
		raise ValueError('Invalid velocity. Should be a positive number.'						)
def        __lowerCAmelCase							(_UpperCamelCase			,    _UpperCamelCase						):
	check_args(_UpperCamelCase			,    _UpperCamelCase						)
	__lowerCAmelCase     :		Union[str, Any]		     = angle_to_radians(2 * angle						)
	return round(init_velocity**2 * sin(_UpperCamelCase						) / g			,    2						)
def        __lowerCAmelCase							(_UpperCamelCase			,    _UpperCamelCase						):
	check_args(_UpperCamelCase			,    _UpperCamelCase						)
	__lowerCAmelCase     :		Tuple		     = angle_to_radians(_UpperCamelCase						)
	return round(init_velocity**2 * sin(_UpperCamelCase						) ** 2 / (2 * g)			,    2						)
def        __lowerCAmelCase							(_UpperCamelCase			,    _UpperCamelCase						):
	check_args(_UpperCamelCase			,    _UpperCamelCase						)
	__lowerCAmelCase     :		Union[str, Any]		     = angle_to_radians(_UpperCamelCase						)
	return round(2 * init_velocity * sin(_UpperCamelCase						) / g			,    2						)
def        __lowerCAmelCase							():
	__lowerCAmelCase     ,  __lowerCAmelCase     :		Optional[Any]		     = 25, 20
	assert horizontal_distance(_UpperCamelCase			,    _UpperCamelCase						) == 40.97
	assert max_height(_UpperCamelCase			,    _UpperCamelCase						) == 3.73
	assert total_time(_UpperCamelCase			,    _UpperCamelCase						) == 1.74


if __name__ == "__main__":
							from doctest import testmod

							testmod()

							# Get input from user
							lowerCamelCase__     =						float(input("""Initial Velocity: """).strip())

							# Get input from user
							lowerCamelCase__     =						float(input("""angle: """).strip())

							# Print results
							print()
							print("""Results: """)
							print(f'Horizontal Distance: {horizontal_distance(init_vel, angle)!s} [m]')
							print(f'Maximum Height: {max_height(init_vel, angle)!s} [m]')
							print(f'Total Time: {total_time(init_vel, angle)!s} [s]')

"""simple docstring"""







def        __lowerCAmelCase							(_UpperCamelCase = 10**6						):

	if n <= 0:
		raise ValueError('Please enter an integer greater than 0'						)

	__lowerCAmelCase     :		Optional[Any]		     = list(range(n + 1						)						)
	for number in range(2			,    n + 1						):
		if phi[number] == number:
			phi[number] -= 1
			for multiple in range(number * 2			,    n + 1			,    _UpperCamelCase						):
				__lowerCAmelCase     :		Tuple		     = (phi[multiple] // number) * (number - 1)

	__lowerCAmelCase     :		Any		     = 1
	for number in range(1			,    n + 1						):
		if (answer / phi[answer]) < (number / phi[number]):
			__lowerCAmelCase     :		List[Any]		     = number

	return answer


if __name__ == "__main__":
							print(solution())