n = int(input())
divisor = 2
unique = set()
while n > 1:
if n % divisor == 0:
print(divisor, end=' ')
unique.add(divisor)
n //= divisor
else:
divisor += 1
print('\nКоличество уникальных делителей: {0}'.format(len(unique)))
n = int(input())
divisor = 2
unique = set()
while n > 1:
if n % divisor == 0:
print(divisor, end=' ')
unique.add(divisor)
n //= divisor
else:
divisor += 1
print('\nКоличество уникальных делителей: {0}'.format(len(unique)))