PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#SP0000025. Phân tích thừa số nguyên tố dùng dấu nhân (Prime factorization)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Phân tích thừa số nguyên tố dùng dấu nhân (Prime factorization)

Prime factorization

Source: Codeforces

Version: Phuoc Hung OJ Extended

Problem Statement

Given integer n≥2n\ge2, write its prime factorization with all prime factors in non-decreasing order, repeating factors according to multiplicity. Print an asterisk * between adjacent factors, with no spaces and no leading or trailing asterisk.

Input

One line contains integer nn.

Output

Print the prime factors whose product equals nn, separated by literal * characters.

Subtasks

  • Subtask 1 (20 points): 2≤n≤1002\le n\le 100.
  • Subtask 2 (30 points): 2≤n≤10002\le n\le 1000.
  • Subtask 3 (50 points): 2≤n≤100002\le n\le 10000.

Examples

Input

245

Output

5*7*7

Explanation

Since 245=5⋅49=5⋅7⋅7245=5\cdot49=5\cdot7\cdot7, the required output is 5*7*7.

Input

19

Output

19

Explanation

The number 1919 is prime, so its factorization has one factor and needs no separator; print 19.