{"problem":{"name":"Circumferences","description":{"content":"You are given $N$ circles on the $xy$\\-coordinate plane. For each $i = 1, 2, \\ldots, N$, the $i$\\-th circle is centered at $(x_i, y_i)$ and has a radius of $r_i$. Determine whether it is possible to g","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc259_d"},"statements":[{"statement_type":"Markdown","content":"You are given $N$ circles on the $xy$\\-coordinate plane. For each $i = 1, 2, \\ldots, N$, the $i$\\-th circle is centered at $(x_i, y_i)$ and has a radius of $r_i$.\nDetermine whether it is possible to get from $(s_x, s_y)$ to $(t_x, t_y)$ by only passing through points that lie on the circumference of at least one of the $N$ circles.\n\n## Constraints\n\n*   $1 \\leq N \\leq 3000$\n*   $-10^9 \\leq x_i, y_i \\leq 10^9$\n*   $1 \\leq r_i \\leq 10^9$\n*   $(s_x, s_y)$ lies on the circumference of at least one of the $N$ circles.\n*   $(t_x, t_y)$ lies on the circumference of at least one of the $N$ circles.\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$\n$s_x$ $s_y$ $t_x$ $t_y$\n$x_1$ $y_1$ $r_1$\n$x_2$ $y_2$ $r_2$\n$\\vdots$\n$x_N$ $y_N$ $r_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc259_d","tags":[],"sample_group":[["4\n0 -2 3 3\n0 0 2\n2 0 2\n2 3 1\n-3 3 3","Yes\n\n![image](https://img.atcoder.jp/abc259/7b850385b9d67dc150435ffc7818bd94.png)\nHere is one way to get from $(0, -2)$ to $(3, 3)$.\n\n*   From $(0, -2)$, pass through the circumference of the $1$\\-st circle counterclockwise to reach $(1, -\\sqrt{3})$.\n*   From $(1, -\\sqrt{3})$, pass through the circumference of the $2$\\-nd circle clockwise to reach $(2, 2)$.\n*   From $(2, 2)$, pass through the circumference of the $3$\\-rd circle counterclockwise to reach $(3, 3)$.\n\nThus, `Yes` should be printed."],["3\n0 1 0 3\n0 0 1\n0 0 2\n0 0 3","No\n\n![image](https://img.atcoder.jp/abc259/924efa40ff28e5d7125841da2710d012.png)\nIt is impossible to get from $(0, 1)$ to $(0, 3)$ by only passing through points on the circumference of at least one of the circles, so `No` should be printed."]],"created_at":"2026-03-03 11:01:14"}}