{"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\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eBob is playing a game named \"Walk on Matrix\".\u003c/p\u003e\u003cp\u003eIn this game, player is given an $$$n \\times m$$$ matrix $$$A\u003d(a_{i,j})$$$, i.e. the element in the $$$i$$$-th row in the $$$j$$$-th column is $$$a_{i,j}$$$. Initially, player is located at position $$$(1,1)$$$ with score $$$a_{1,1}$$$. \u003c/p\u003e\u003cp\u003eTo reach the goal, position $$$(n,m)$$$, player can move right or down, i.e. move from $$$(x,y)$$$ to $$$(x,y+1)$$$ or $$$(x+1,y)$$$, as long as player is still on the matrix.\u003c/p\u003e\u003cp\u003eHowever, each move changes player\u0027s score to the \u003ca href\u003d\"https://en.wikipedia.org/wiki/Bitwise_operation#AND\"\u003ebitwise AND\u003c/a\u003e of the current score and the value at the position he moves to.\u003c/p\u003e\u003cp\u003eBob can\u0027t wait to find out the maximum score he can get using the tool he recently learnt \u0026nbsp;— dynamic programming. Here is his algorithm for this problem. \u003c/p\u003e\u003ccenter\u003e \u003cimg class\u003d\"tex-graphics\" src\u003d\"CDN_BASE_URL/cd841860ab438dc4b413f9204ed72cae?v\u003d1715753612\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e \u003c/center\u003e\u003cp\u003eHowever, he suddenly realize that the algorithm above fails to output the maximum score for some matrix $$$A$$$. Thus, for any given non-negative integer $$$k$$$, he wants to find out an $$$n \\times m$$$ matrix $$$A\u003d(a_{i,j})$$$ such that \u003c/p\u003e\u003cul\u003e \u003cli\u003e $$$1 \\le n,m \\le 500$$$ (as Bob hates large matrix); \u003c/li\u003e\u003cli\u003e $$$0 \\le a_{i,j} \\le 3 \\cdot 10^5$$$ for all $$$1 \\le i\\le n,1 \\le j\\le m$$$ (as Bob hates large numbers); \u003c/li\u003e\u003cli\u003e the difference between the maximum score he can get and the output of his algorithm is \u003cspan class\u003d\"tex-font-style-bf\"\u003eexactly\u003c/span\u003e $$$k$$$. \u003c/li\u003e\u003c/ul\u003e\u003cp\u003eIt can be shown that for any given integer $$$k$$$ such that $$$0 \\le k \\le 10^5$$$, there exists a matrix satisfying the above constraints.\u003c/p\u003e\u003cp\u003ePlease help him with it!\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe only line of the input contains one single integer $$$k$$$ ($$$0 \\le k \\le 10^5$$$).\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eOutput two integers $$$n$$$, $$$m$$$ ($$$1 \\le n,m \\le 500$$$) in the first line, representing the size of the matrix. \u003c/p\u003e\u003cp\u003eThen output $$$n$$$ lines with $$$m$$$ integers in each line, $$$a_{i,j}$$$ in the $$$(i+1)$$$-th row, $$$j$$$-th column.\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\u003e0\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1 1\n300000\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\u003e1\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e3 4\n7 3 3 1\n4 8 3 6\n7 7 7 3\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eIn the first example, the maximum score Bob can achieve is $$$300000$$$, while the output of his algorithm is $$$300000$$$.\u003c/p\u003e\u003cp\u003eIn the second example, the maximum score Bob can achieve is $$$7\\\u0026amp;3\\\u0026amp;3\\\u0026amp;3\\\u0026amp;7\\\u0026amp;3\u003d3$$$, while the output of his algorithm is $$$2$$$.\u003c/p\u003e"}}]}