import sys
num=int(sys.stdin.readline())
l = []
def is_susu(num):
for i in range(2, num):
if i*i>num:
break
if num % i == 0:
return False
return True
def k(num,key):
count=0
while num:
if num%key==0:
count=count+1
l.append(key)
num=num/key
if num!=int(num):
break
return int(num*key)
def yueshu(num):
while num>1:
if is_susu(num):
l.append(num)
break
for i in range(2, num + 1):
if num % i == 0 and is_susu(i):
num=k(num,i)
break
if __name__ == "__main__":
res=[]
yueshu_list=yueshu(num)
for item in l:
res.append(item)
z=""
for item in res:
z=z+str(item)+" "
print(z)
num=int(sys.stdin.readline())
l = []
def is_susu(num):
for i in range(2, num):
if i*i>num:
break
if num % i == 0:
return False
return True
def k(num,key):
count=0
while num:
if num%key==0:
count=count+1
l.append(key)
num=num/key
if num!=int(num):
break
return int(num*key)
def yueshu(num):
while num>1:
if is_susu(num):
l.append(num)
break
for i in range(2, num + 1):
if num % i == 0 and is_susu(i):
num=k(num,i)
break
if __name__ == "__main__":
res=[]
yueshu_list=yueshu(num)
for item in l:
res.append(item)
z=""
for item in res:
z=z+str(item)+" "
print(z)
调试了很久