


'''simple docstring'''



from PIL import Image




def      _a     (						_lowercase :     int      , _lowercase :     List[Any]  ):





     '''simple docstring'''






     __UpperCAmelCase     :			Any  							=      (259 * (level + 255)) / (255 * (259 - level))

     def contrast(_lowercase :     Optional[int]  ) -> int:
          return int(128 + factor * (c - 128)  )

     return img.point(SCREAMING_SNAKE_CASE__  )


if __name__ == "__main__":
    # Load image
    with Image.open("image_data/lena.jpg") as img:
        # Change contrast to 170
        __UpperCAmelCase      :Tuple			    =       change_contrast(img, 1_7_0)
        cont_img.save("image_data/lena_high_contrast.png", format="png")



'''simple docstring'''



def      _a     (						_lowercase :     int = 600851475143  ):





     '''simple docstring'''






     try:
          __UpperCAmelCase     :			str  							=      int(_lowercase  )
     except (TypeError, ValueError):
          raise TypeError('''Parameter n must be int or castable to int.'''  )
     if n <= 0:
          raise ValueError('''Parameter n must be greater than or equal to one.'''  )
     __UpperCAmelCase     :			Dict  							=      1
     __UpperCAmelCase     :			List[str]  							=      2
     while i * i <= n:
          while n % i == 0:
               __UpperCAmelCase     :			int  							=      i
               n //= i
          i += 1
     if n > 1:
          __UpperCAmelCase     :			List[str]  							=      n
     return int(_lowercase  )


if __name__ == "__main__":
      print(f"""{solution() = }""")