{"problem":{"name":"Distance","description":{"content":"We have $N$ points in the two-dimensional plane. The coordinates of the $i$\\-th point are $(X_i,Y_i)$. Among them, we are looking for the points such that the distance from the origin is at most $D$. ","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc174_b"},"statements":[{"statement_type":"Markdown","content":"We have $N$ points in the two-dimensional plane. The coordinates of the $i$\\-th point are $(X_i,Y_i)$.\nAmong them, we are looking for the points such that the distance from the origin is at most $D$. How many such points are there?\nWe remind you that the distance between the origin and the point $(p, q)$ can be represented as $\\sqrt{p^2+q^2}$.\n\n## Constraints\n\n*   $1 \\leq N \\leq 2\\times 10^5$\n*   $0 \\leq D \\leq 2\\times 10^5$\n*   $|X_i|,|Y_i| \\leq 2\\times 10^5$\n*   All values in input are integers.\n\n## Input\n\nInput 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":"abc174_b","tags":[],"sample_group":[["4 5\n0 5\n-2 4\n3 4\n4 -4","3\n\nThe distance between the origin and each of the given points is as follows:\n\n*   $\\sqrt{0^2+5^2}=5$\n*   $\\sqrt{(-2)^2+4^2}=4.472\\ldots$\n*   $\\sqrt{3^2+4^2}=5$\n*   $\\sqrt{4^2+(-4)^2}=5.656\\ldots$\n\nThus, we have three points such that the distance from the origin is at most $5$."],["12 3\n1 1\n1 1\n1 1\n1 1\n1 2\n1 3\n2 1\n2 2\n2 3\n3 1\n3 2\n3 3","7\n\nMultiple points may exist at the same coordinates."],["20 100000\n14309 -32939\n-56855 100340\n151364 25430\n103789 -113141\n147404 -136977\n-37006 -30929\n188810 -49557\n13419 70401\n-88280 165170\n-196399 137941\n-176527 -61904\n46659 115261\n-153551 114185\n98784 -6820\n94111 -86268\n-30401 61477\n-55056 7872\n5901 -163796\n138819 -185986\n-69848 -96669","6"]],"created_at":"2026-03-03 11:01:14"}}