import math num = int(input()) for n in range(2, int(math.sqrt(num))+1): while num % n == 0: print(n, end=' ') num = num // n if num > 2: print(num, end=' ')
import math num = int(input()) for n in range(2, int(math.sqrt(num))+1): while num % n == 0: print(n, end=' ') num = num // n if num > 2: print(num, end=' ')