xy=int(input())
for i in range(1,xy+1):
    if(xy%i==0):
         print(i,end=' ')

d08f97b3fbc047b8697693181cf63e8bc383bf4f
<mask token>

<mask token>
for i in range(1, xy + 1):
    if xy % i == 0:
        print(i, end=' ')

xy = int(input())
for i in range(1, xy + 1):
    if xy % i == 0:
        print(i, end=' ')

xy=int(input())
for i in range(1,xy+1):
    if(xy%i==0):
         print(i,end=' ')
