using System;
using System.Collections.Generic;
using System.Linq;
// Q085 素因数分解 https://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=NTL_1_A&lang=jp
class Program
{
static string InputPattern = "InputX";
static List<string> GetInputList()
{
var WillReturn = new List<string>();
if (InputPattern == "Input1") {
WillReturn.Add("12");
//12: 2 2 3
}
else if (InputPattern == "Input2") {
WillReturn.Add("126");
//126: 2 3 3 7
}
else {
string wkStr;
while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr);
}
return WillReturn;
}
static void Main()
{
List<string> InputList = GetInputList();
long N = long.Parse(InputList[0]);
Dictionary<long, long> SoinsuuDict = DeriveSoinsuuDict(N);
var OutStrList = new List<string>();
OutStrList.Add(string.Format("{0}:", N));
foreach (var EachSoinsuu in SoinsuuDict) {
for (long I = 1; I <= EachSoinsuu.Value; I++) {
OutStrList.Add(EachSoinsuu.Key.ToString());
}
}
Console.WriteLine(string.Join(" ", OutStrList.ToArray()));
}
// 素因数分解し、指数[素数]なDictを返す
static Dictionary<long, long> DeriveSoinsuuDict(long pTarget)
{
var WillReturn = new Dictionary<long, long>();
long CurrVal = pTarget;
// ルートより大きい数を、素因素に持つとしても、1つだけのため
// ルートまで試し割りを行い、素因数が残っていたら、追加する
for (long I = 2; I * I <= pTarget; I++) {
if (CurrVal % I > 0) continue;
WillReturn[I] = 0;
while (CurrVal % I == 0) {
WillReturn[I]++;
CurrVal /= I;
}
if (CurrVal == 1) break;
}
// 素因数が残っている場合
if (CurrVal > 1) {
WillReturn[CurrVal] = 1;
}
return WillReturn;
}
}