问题2510--Prime Factor

2510: Prime Factor

[命题人 : ]
时间限制 : 1.000 sec  内存限制 : 64 MB

题目描述

Give you a positive integer, please split it to some prime numbers, and you can got it through sample input and sample output.

输入

Input file contains multiple test case, each case consists of a positive integer n(1 < n < 65536), one per line. a negative terminates the input, and it should not to be processed.

输出

For each test case you should output its factor as sample output (prime factor must come forth ascending ), after each number you should output a space.There is a blank line between outputs.

样例输入 Copy

60
12
-1

样例输出 Copy

Case 1.
2 2 3 1 5 1

Case 2.
2 2 3 1

提示

60=2^2*3^1*5^1

来源/分类

hdu