{"raw_statement":[{"iden":"problem statement","content":"> Divide a cube with a side length of $N$ into $N^3$ smaller cubes, each with a side length of $1$, and select $K$ of these smaller cubes. Construct one way to select them so that, when viewed from any of the three directions perpendicular to the faces of the cubes, all $K$ selected cubes are visible and appear in the same shape.\n\nTo formulate the problem precisely, we associate each smaller cube after division with a triple of integers $(x_i, y_i, z_i)$.\nConstruct and print one set of $K$ triples of integers $(x_i, y_i, z_i)$ that satisfy the following conditions.\n\n*   $0 \\leq x_i, y_i, z_i < N$\n*   $\\left\\lbrace (x_i, y_i) \\, \\middle| \\, 1 \\le i \\le K \\right\\rbrace = \\left\\lbrace (y_i, z_i) \\, \\middle| \\, 1 \\le i \\le K \\right\\rbrace = \\left\\lbrace (z_i, x_i) \\, \\middle| \\, 1 \\le i \\le K \\right\\rbrace$\n*   The set mentioned in the previous item has $K$ elements. That is, $(x_i, y_i) \\neq (x_j, y_j)$ for $i \\neq j$.\n\nIt can be shown that a solution exists for any input satisfying the constraints."},{"iden":"constraints","content":"*   All input values are integers.\n*   $1 \\leq N \\leq 500$\n*   $1 \\leq K \\leq N^2$"},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$ $K$"},{"iden":"sample input 1","content":"3 3"},{"iden":"sample output 1","content":"0 0 0\n1 1 1\n2 2 2"},{"iden":"sample input 2","content":"2 4"},{"iden":"sample output 2","content":"0 0 1\n0 1 0\n1 0 0\n1 1 1"},{"iden":"sample input 3","content":"1 1"},{"iden":"sample output 3","content":"0 0 0"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}