FACTCG - Easy Factorization

no tags 


The task in this problem is to write a number in a multiplication of prime numbers separated by “ x”. You need to put the 

number 1 in this multiplication.

Input

The input consists of several lines.

Each line consists of one integer N (1 <= N <= 10^5) .


Output

For each line you need to output the factorization separated by “ x” and including 1.


Sample Input

1

2

4

8

Sample Output

 

1
1 x 2
1 x 2 x 2
1 x 2 x 2 x 2


hide comments
[Retired] Fendy Kosnatha: 2012-02-27 01:35:13

my solution in FACT0 and FACT1 is AC, but why in this problem is TLE? :|

Mitch Schwartz: 2012-02-27 01:33:35

Judge is strict regarding whitespace in output. (Why not just use standard judge?)

In my opinion this belongs in tutorial.

Last edit: 2012-02-27 00:57:55
Mateus Dantas [ UFCG ]: 2012-02-27 01:33:35

No, is different... In these problems a simple approach used in this problem isn't enough to get AC. :)

Alex Anderson: 2012-02-27 01:33:35

These problems already exist: See FACT0 FACT1 FACT2


Added by:Phyllipe Medeiros
Date:2012-02-26
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64