<reponame>william-james-pj/LogicaProgramacao
num = int(input())
for y in range(1, num+1):
    if num % y == 0:
        print(y)
num = int(input())
for y in range(1, num+1):
    if num % y == 0:
        print(y)