{"trustable":true,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027$$$$$$\u0027, right: \u0027$$$$$$\u0027, display: true},\n {left: \u0027$$$\u0027, right: \u0027$$$\u0027, display: false},\n {left: \u0027$$\u0027, right: \u0027$$\u0027, display: true},\n {left: \u0027$\u0027, right: \u0027$\u0027, display: false}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eYukikaze is studying number theory. She wonders whether she can arrange all positive integers between $$$1$$$ and $$$n$$$ ($$$n$$$ is a positive even integer) into several disjoint cycles such that each cycle contains at least three integers, and the sum of any two adjacent integers is a prime number in any cycle.\u003c/p\u003e\u003cp\u003ePrime numbers are integers greater than $$$1$$$ and cannot be exactly divided by any positive integer other than itself and $$$1$$$.\u003c/p\u003e\u003cp\u003eFormally speaking, Yukikaze wants to find $$$k$$$ sequences $$$A_1, A_2, \\ldots, A_k$$$ that satisfy the following conditions:\u003c/p\u003e\u003col\u003e \u003cli\u003e Each sequence contains at least three integers. \u003c/li\u003e\u003cli\u003e Each integer between $$$1$$$ and $$$n$$$ appears in exactly one sequence. \u003c/li\u003e\u003cli\u003e For any sequence $$$A_i \u003d \\{ a_{i,1}, a_{i,2}, \\ldots, a_{i,l} \\}$$$, $$$a_{i,j}+a_{i,j+1}$$$ is a prime number for any $$$1 \\leq j \u0026lt; l$$$, and $$$a_{i,1}+a_{i,l}$$$ must be a prime number too. \u003c/li\u003e\u003c/ol\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe input contains only one positive even integer $$$n$$$ ($$$2 \\leq n \\leq 10^4$$$).\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eOutput the number of cycles $$$k$$$ in the first line.\u003c/p\u003e\u003cp\u003eEach of the following $$$k$$$ lines starts with a positive integer $$$l$$$ denoting the number of integers in the cycle, followed by $$$l$$$ integers denoting the integers in the cycle in order. If there are multiple answers, print any. Do \u003cspan class\u003d\"tex-font-style-bf\"\u003eNOT\u003c/span\u003e print any extra spaces at the end of each line.\u003c/p\u003e\u003cp\u003eIf it is impossible to arrange these $$$n$$$ integers, print $$$-1$$$ in a single line.\u003c/p\u003e"}},{"title":"Examples","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\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\u003e8\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1\n8 1 2 3 8 5 6 7 4\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\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\u003e18\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e3\n4 1 2 3 4\n6 5 6 7 10 9 8\n8 11 12 17 14 15 16 13 18\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}