




"""simple docstring"""
def 				__lowerCAmelCase					(					__lowerCAmelCase			:		int = 10**6						)    ->       int:

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

 _UpperCamelCase      :	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  ,	__lowerCAmelCase						):
    _UpperCamelCase      :	List[Any]					      =  (phi[multiple] // number) * (number - 1)

 _UpperCamelCase      :	Tuple					      =  1
 for number in range(1  ,	n + 1						):
  if (answer / phi[answer]) < (number / phi[number]):
   _UpperCamelCase      :	str					      =  number

 return answer


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









"""simple docstring"""
import numpy as np
from numpy import floataa
from numpy.typing import NDArray






def 				__lowerCAmelCase					(					__lowerCAmelCase			:		NDArray[floataa]  ,	__lowerCAmelCase			:		NDArray[floataa]						)    ->       NDArray[floataa]:
 _UpperCamelCase      ,	_UpperCamelCase      :	Optional[Any]					      =  np.shape(__lowerCAmelCase						)

 _UpperCamelCase      :	NDArray[floataa]					      =  np.zeros((rows, 1)  ,	dtype=__lowerCAmelCase						)
 for row in reversed(range(__lowerCAmelCase						)						):
  _UpperCamelCase      :	List[str]					      =  0
  for col in range(row + 1  ,	__lowerCAmelCase						):
   total += coefficients[row, col] * x[col]

  _UpperCamelCase      :	Dict					      =  (vector[row] - total) / coefficients[row, row]

 return x






def 				__lowerCAmelCase					(					__lowerCAmelCase			:		NDArray[floataa]  ,	__lowerCAmelCase			:		NDArray[floataa]						)    ->       NDArray[floataa]:
 _UpperCamelCase      ,	_UpperCamelCase      :	Optional[Any]					      =  np.shape(__lowerCAmelCase						)
 if rows != columns:
  return np.array(()  ,	dtype=__lowerCAmelCase						)

 # augmented matrix
 _UpperCamelCase      :	NDArray[floataa]					      =  np.concatenate((coefficients, vector)  ,	axis=1						)
 _UpperCamelCase      :	List[str]					      =  augmented_mat.astype("float64"						)

 # scale the matrix leaving it triangular
 for row in range(rows - 1						):
  _UpperCamelCase      :	Optional[Any]					      =  augmented_mat[row, row]
  for col in range(row + 1  ,	__lowerCAmelCase						):
   _UpperCamelCase      :	Union[str, Any]					      =  augmented_mat[col, row] / pivot
   augmented_mat[col, :] -= factor * augmented_mat[row, :]

 _UpperCamelCase      :	Any					      =  retroactive_resolution(
     augmented_mat[:, 0:columns]  ,	augmented_mat[:, columns : columns + 1]						)

 return x


if __name__ == "__main__":
    import doctest

    doctest.testmod()



