




import math
def 		a_       (   __lowerCAmelCase							):
  if n <= 0:
    raise ValueError('''Only positive integers have prime factors'''							)
  lowerCAmelCase__								=			[]
  while n % 2 == 0:
    pf.append(2							)
    lowerCAmelCase__								=			int(n / 2							)
  for i in range(3      ,   int(math.sqrt(__lowerCAmelCase							)							) + 1      ,   2							):
    while n % i == 0:
      pf.append(__lowerCAmelCase							)
      lowerCAmelCase__								=			int(n / i							)
  if n > 2:
    pf.append(__lowerCAmelCase							)
  return pf
def 		a_       (   __lowerCAmelCase							):
  if n <= 0:
    raise ValueError('''Only positive numbers are accepted'''							)
  lowerCAmelCase__								=			1
  lowerCAmelCase__								=			1
  while n % 2 == 0:
    temp += 1
    lowerCAmelCase__								=			int(n / 2							)
  div *= temp
  for i in range(3      ,   int(math.sqrt(__lowerCAmelCase							)							) + 1      ,   2							):
    lowerCAmelCase__								=			1
    while n % i == 0:
      temp += 1
      lowerCAmelCase__								=			int(n / i							)
    div *= temp
  if n > 1:
    div *= 2
  return div
def 		a_       (   __lowerCAmelCase							):
  if n <= 0:
    raise ValueError('''Only positive numbers are accepted'''							)
  lowerCAmelCase__								=			1
  lowerCAmelCase__								=			1
  while n % 2 == 0:
    temp += 1
    lowerCAmelCase__								=			int(n / 2							)
  if temp > 1:
    s *= (2**temp - 1) / (2 - 1)
  for i in range(3      ,   int(math.sqrt(__lowerCAmelCase							)							) + 1      ,   2							):
    lowerCAmelCase__								=			1
    while n % i == 0:
      temp += 1
      lowerCAmelCase__								=			int(n / i							)
    if temp > 1:
      s *= (i**temp - 1) / (i - 1)
  return int(__lowerCAmelCase							)
def 		a_       (   __lowerCAmelCase							):
  lowerCAmelCase__								=			n
  for x in set(prime_factors(__lowerCAmelCase							)							):
    s *= (x - 1) / x
  return int(__lowerCAmelCase							)


if __name__ == "__main__":
      import doctest

      doctest.testmod()







__magic_name__     :     dict[str, float]  							=					{
    "kilogram": 1,
    "gram": pow(10, 3),
    "milligram": pow(10, 6),
    "metric-ton": pow(10, -3),
    "long-ton": 0.0009842073,
    "short-ton": 0.0011023122,
    "pound": 2.2046244202,
    "stone": 0.1574731728,
    "ounce": 35.273990723,
    "carrat": 50_00,
    "atomic-mass-unit": 6.022_136_652E26,
}

__magic_name__     :     dict[str, float]  							=					{
    "kilogram": 1,
    "gram": pow(10, -3),
    "milligram": pow(10, -6),
    "metric-ton": pow(10, 3),
    "long-ton": 1016.04608,
    "short-ton": 907.184,
    "pound": 0.453592,
    "stone": 6.35029,
    "ounce": 0.0283495,
    "carrat": 0.0002,
    "atomic-mass-unit": 1.660_540_199E-27,
}
def 		a_       (   __lowerCAmelCase      ,   __lowerCAmelCase      ,   __lowerCAmelCase							):
  if to_type not in KILOGRAM_CHART or from_type not in WEIGHT_TYPE_CHART:
    lowerCAmelCase__								=			(
        F"""Invalid 'from_type' or 'to_type' value: {from_type!r}, {to_type!r}\n"""
        F"""Supported values are: {', '.join(__lowerCAmelCase							)}"""
    )
    raise ValueError(__lowerCAmelCase							)
  return value * KILOGRAM_CHART[to_type] * WEIGHT_TYPE_CHART[from_type]


if __name__ == "__main__":
      import doctest

      doctest.testmod()

