{"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\u003eLeo Jr. draws pictures in his notebook with checkered sheets (that is, each sheet has a regular square grid printed on it). We can assume that the sheets are infinitely large in any direction.\u003c/p\u003e\u003cp\u003eTo draw a picture, Leo Jr. colors some of the cells on a sheet gray. He considers the resulting picture \u003cspan class\u003d\"tex-font-style-it\"\u003ebeautiful\u003c/span\u003e if the following conditions are satisfied:\u003c/p\u003e\u003cul\u003e\u003cli\u003e The picture is \u003cspan class\u003d\"tex-font-style-bf\"\u003econnected\u003c/span\u003e, that is, it is possible to get from any gray cell to any other by following a chain of gray cells, with each pair of adjacent cells in the path being neighbours (that is, sharing a side).\u003c/li\u003e\u003cli\u003e Each gray cell has an \u003cspan class\u003d\"tex-font-style-bf\"\u003eeven number of gray neighbours\u003c/span\u003e.\u003c/li\u003e\u003cli\u003e There are \u003cspan class\u003d\"tex-font-style-bf\"\u003eexactly $$$n$$$ gray cells with all gray neighbours\u003c/span\u003e. The number of other gray cells can be arbitrary \u003cspan class\u003d\"tex-font-style-it\"\u003e(but reasonable, so that they can all be listed)\u003c/span\u003e.\u003c/li\u003e\u003c/ul\u003e\u003cp\u003eLeo Jr. is now struggling to draw a beautiful picture with a particular choice of $$$n$$$. Help him, and provide any example of a beautiful picture.\u003c/p\u003e\u003cp\u003eTo output cell coordinates in your answer, assume that the sheet is provided with a Cartesian coordinate system such that one of the cells is chosen to be the origin $$$(0, 0)$$$, axes $$$0x$$$ and $$$0y$$$ are orthogonal and parallel to grid lines, and a unit step along any axis in any direction takes you to a neighbouring cell.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe only line contains a single integer $$$n$$$ ($$$1 \\leq n \\leq 500$$$)\u0026nbsp;— the number of gray cells with all gray neighbours in a beautiful picture.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eIn the first line, print a single integer $$$k$$$\u0026nbsp;— the number of gray cells in your picture. For technical reasons, $$$k$$$ should not exceed $$$5 \\cdot 10^5$$$.\u003c/p\u003e\u003cp\u003eEach of the following $$$k$$$ lines should contain two integers\u0026nbsp;— coordinates of a gray cell in your picture. All listed cells should be distinct, and the picture should satisdfy all the properties listed above. All coordinates should not exceed $$$10^9$$$ by absolute value.\u003c/p\u003e\u003cp\u003eOne can show that there exists an answer satisfying all requirements with a small enough $$$k$$$.\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\u003e4\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e12\n1 0\n2 0\n0 1\n1 1\n2 1\n3 1\n0 2\n1 2\n2 2\n3 2\n1 3\n2 3\n\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\u003eThe answer for the sample is pictured below:\u003c/p\u003e\u003ccenter\u003e \u003cimg class\u003d\"tex-graphics\" src\u003d\"CDN_BASE_URL/b437aa33d9c9e43bea4c8b72d8a8ec6b?v\u003d1715777409\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e \u003c/center\u003e"}}]}