{"raw_statement":[{"iden":"problem statement","content":"Given are $N$ pairs of integers $(x_i,y_i)$, numbered $1$ to $N$, and an integer $K$.  \nList all pairs of integers $(p,q)$ that satisfy the conditions below, in the format specified in Output.\n\n*   $1 \\le p < q \\le N$\n*   $\\sqrt{(x_p-x_q)^2+(y_p-y_q)^2} \\le K$\n\nHere, it is guaranteed that there are at most $4 \\times 10^5$ such pairs of integers."},{"iden":"constraints","content":"*   All values in input are integers.\n*   $1 \\le N \\le 2 \\times 10^5$\n*   $1 \\le K \\le 1.5 \\times 10^9$\n*   $0 \\le x_i,y_i \\le 10^9$\n*   There are at most $4 \\times 10^5$ pairs of integers that should be listed."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $K$\n$x_1$ $y_1$\n$x_2$ $y_2$\n$\\vdots$\n$x_N$ $y_N$"},{"iden":"sample input 1","content":"6 5\n2 0\n2 2\n3 4\n0 0\n5 5\n8 3"},{"iden":"sample output 1","content":"9\n1 2\n1 3\n1 4\n2 3\n2 4\n2 5\n3 4\n3 5\n5 6\n\nThere are $9$ pairs of integers that satisfy the conditions, which should be printed in the specified format.  \n$(1,2),(1,3),(1,4),(2,3),(2,4),(2,5),(3,4),(3,5),(5,6)$"},{"iden":"sample input 2","content":"2 1414213562\n0 0\n1000000000 1000000000"},{"iden":"sample output 2","content":"0\n\nThere may be zero pairs of integers that satisfy the conditions."},{"iden":"sample input 3","content":"10 150\n300 300\n300 400\n300 500\n400 300\n400 400\n400 400\n400 500\n500 300\n500 400\n500 500"},{"iden":"sample output 3","content":"29\n1 2\n1 4\n1 5\n1 6\n2 3\n2 4\n2 5\n2 6\n2 7\n3 5\n3 6\n3 7\n4 5\n4 6\n4 8\n4 9\n5 6\n5 7\n5 8\n5 9\n5 10\n6 7\n6 8\n6 9\n6 10\n7 9\n7 10\n8 9\n9 10\n\nThere may be pairs of integers $(i,j)$ ($i < j$) such that $x_i=x_j$ and $y_i=y_j$."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}