{"trustable":true,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n #problem-body \u003e pre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333;\n background: rgba(255, 255, 255, 0.5);\n border: 1px solid #ccc;\n border-radius: 6px;\n }\n\u003c/style\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv id\u003d\"problem-body\"\u003e\n\t\u003cp\u003eFactorial \u003cstrong\u003en!\u003c/strong\u003e of an integer number \u003cstrong\u003en ≥ 0\u003c/strong\u003e is defined recursively as follows:\u003c/p\u003e\r\n\u003ctable style\u003d\"border: thin solid black;\" border\u003d\"0\" align\u003d\"center\" bgcolor\u003d\"#ffffff\"\u003e\r\n\u003ctbody\u003e\r\n\u003ctr\u003e\r\n\u003ctd\u003e\u003cstrong\u003e\r\n\u003cdiv style\u003d\"margin: 15px 80px;\"\u003e0! \u003d 1\u003cbr\u003e n! \u003d n * (n - 1)!\u003c/div\u003e\r\n\u003c/strong\u003e\u003c/td\u003e\r\n\u003c/tr\u003e\r\n\u003c/tbody\u003e\r\n\u003c/table\u003e\r\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\r\n\u003cp\u003eWhile playing with factorials ChEEtah noticed that some of them can be represented as a product of other factorials, e.g. \u003cstrong\u003e6! \u003d 3! * 5! \u003d 720\u003c/strong\u003e. Such factorisation helps ChEEtah to simplify a certain class of equations he is working on during his research.\u003c/p\u003e\r\n\u003cp\u003eSo he needs a program that finds a compact factorisation of a given factorial or determines that it is impossible if that is the case. If there are more than one factorisation the program has to find such that contains the minimum number of terms. For example, \u003cstrong\u003e10!\u003c/strong\u003e can be factorised in two different ways: \u003cstrong\u003e10! \u003d 6! * 7! \u003d 3! * 5! * 7!\u003c/strong\u003e. The first factorisation contains only two terms and should be preferred to the second one. If there are several factorisations with the same minimum number of terms then any optimal solution is acceptable.\u003c/p\u003e\r\n\u003ch3\u003eInput\u003c/h3\u003e\r\n\u003cp\u003eInput contains the only integer \u003cstrong\u003e2 ≤ n ≤ 1000\u003c/strong\u003e which factorial \u003cstrong\u003en!\u003c/strong\u003e should be factorised.\u003c/p\u003e\r\n\u003ch3\u003eOutput\u003c/h3\u003e\r\n\u003cp\u003e Output should contain the optimal factorisation in the format shown in the samples. The factorisation terms should go in non-decreasing order. If no factorisation can be found print \u003cstrong\u003eNo solution\u003c/strong\u003e.\u003c/p\u003e\r\n\u003ch3\u003eExample\u003c/h3\u003e\r\n\u003cdiv\u003e\u003ctable class\u003d\"vjudge_sample\"\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e9\r\n\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e9! \u003d 2! * 3! * 3! * 7!\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/div\u003e\n\u003c/div\u003e"}}]}