Codeforces Beta Round 54 (Div. 2)
B
Coins
Codeforces
1300
原题
← AC →
翻译中…

In Berland a money reform is being prepared. New coins are being introduced. After long economic calculations was decided that the most expensive coin should possess the denomination of exactly $*n*$ Berland dollars. Also the following restriction has been introduced for comfort: the denomination of each coin should be divisible by the denomination of any cheaper coin. It is known that among all the possible variants the variant with the largest number of new coins will be chosen. Find this variant. Print in the order of decreasing of the coins' denominations.

翻译中…

Input

翻译中…

The first and only line contains an integer $*n*$ ($1 ≤ *n* ≤ 10^{6}$) which represents the denomination of the most expensive coin.

翻译中…

Output

翻译中…

Print the denominations of all the coins in the order of decreasing. The number of coins must be the largest possible (with the given denomination $*n*$ of the most expensive coin). Also, the denomination of every coin must be divisible by the denomination of any cheaper coin. Naturally, the denominations of all the coins should be different. If there are several solutins to that problem, print any of them.

翻译中…

样例

Input #1
10
Output #1
10 5 1
InputCopy OutputCopy
Input #2
4
Output #2
4 2 1
InputCopy OutputCopy
Input #3
3
Output #3
3 1
InputCopy OutputCopy
题目信息
题号
58B
时间限制
2 s
内存限制
256 MB
标签
贪心

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。