{"problem":{"name":"Do Use Hexagon Grid 2","description":{"content":"We have an infinite hexagonal grid shown below. ![image](https://img.atcoder.jp/abc269/b61b1e0469588c61352a7fa7f7865351.png) A hexagonal cell is represented as $(i,j)$ with two integers $i$ and $j$.  ","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":3000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc280_g"},"statements":[{"statement_type":"Markdown","content":"We have an infinite hexagonal grid shown below.\n![image](https://img.atcoder.jp/abc269/b61b1e0469588c61352a7fa7f7865351.png)\nA hexagonal cell is represented as $(i,j)$ with two integers $i$ and $j$.  \nCell $(i,j)$ is adjacent to the following six cells:\n\n*   $(i-1,j-1)$\n*   $(i-1,j)$\n*   $(i,j-1)$\n*   $(i,j+1)$\n*   $(i+1,j)$\n*   $(i+1,j+1)$\n\nLet us define the distance between two cells $X$ and $Y$ by the minimum number of moves required to travel from cell $X$ to cell $Y$ by repeatedly moving to an adjacent cell.  \nFor example, the distance between cells $(0,0)$ and $(1,1)$ is $1$, and the distance between cells $(2,1)$ and $(-1,-1)$ is $3$.\nYou are given $N$ cells $(X_1,Y_1),\\ldots,(X_N,Y_N)$.  \nHow many ways are there to choose one or more from these $N$ cells so that the distance between any two of the chosen cells is at most $D$?  \nFind the count modulo $998244353$.\n\n## Constraints\n\n*   $1 \\leq N \\leq 300$\n*   $-10^9\\leq X_i,Y_i \\leq 10^9$\n*   $1\\leq D \\leq 10^{10}$\n*   $(X_i,Y_i)$ are pairwise distinct.\n*   All values in the input are integers.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$ $D$\n$X_1$ $Y_1$\n$\\vdots$\n$X_N$ $Y_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc280_g","tags":[],"sample_group":[["3 1\n0 0\n0 1\n1 0","5\n\nThere are five possible sets of the chosen cells: ${(0,0)},{(0,1)},{(1,0)},{(0,0),(0,1)}$, and ${(0,0),(1,0)}$."],["9 1\n0 0\n0 1\n0 2\n1 0\n1 1\n1 2\n2 0\n2 1\n2 2","33"],["5 10000000000\n314159265 358979323\n846264338 -327950288\n-419716939 937510582\n-97494459 -230781640\n628620899 862803482","31"]],"created_at":"2026-03-03 11:01:14"}}