{"problem":{"name":"7","description":{"content":"There are $N$ 7's drawn in the first quadrant of a plane. The $i$\\-th 7 is a figure composed of a segment connecting $(x_i-1,y_i)$ and $(x_i,y_i)$, and a segment connecting $(x_i,y_i-1)$ and $(x_i,y_i","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc225_e"},"statements":[{"statement_type":"Markdown","content":"There are $N$ 7's drawn in the first quadrant of a plane.\nThe $i$\\-th 7 is a figure composed of a segment connecting $(x_i-1,y_i)$ and $(x_i,y_i)$, and a segment connecting $(x_i,y_i-1)$ and $(x_i,y_i)$.\nYou can choose zero or more from the $N$ 7's and delete them.\nWhat is the maximum possible number of 7's that are wholly visible from the origin after the optimal deletion?\nHere, the $i$\\-th 7 is wholly visible from the origin if and only if:\n\n*   the interior (excluding borders) of the quadrilateral whose vertices are the origin, $(x_i-1,y_i)$, $(x_i,y_i)$, $(x_i,y_i-1)$ does not intersect with the other 7's.\n\n## Constraints\n\n*   $1 \\leq N \\leq 2 \\times 10^5$\n*   $1 \\leq x_i,y_i \\leq 10^9$\n*   $(x_i,y_i) \\neq (x_j,y_j)\\ (i \\neq j)$\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$x_1$ $y_1$\n$x_2$ $y_2$\n$\\hspace{0.45cm}\\vdots$\n$x_N$ $y_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc225_e","tags":[],"sample_group":[["3\n1 1\n2 1\n1 2","2\n\nIf the first 7 is deleted, the other two 7's ― the second and third ones ― will be wholly visible from the origin, which is optimal.\nIf no 7's are deleted, only the first 7 is wholly visible from the origin."],["10\n414598724 87552841\n252911401 309688555\n623249116 421714323\n605059493 227199170\n410455266 373748111\n861647548 916369023\n527772558 682124751\n356101507 249887028\n292258775 110762985\n850583108 796044319","10\n\nIt is best to keep all 7's."]],"created_at":"2026-03-03 11:01:13"}}