{"raw_statement":[{"iden":"problem statement","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."},{"iden":"constraints","content":"*   $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."},{"iden":"input","content":"Input 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$"},{"iden":"sample input 1","content":"3\n1 1\n2 1\n1 2"},{"iden":"sample output 1","content":"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."},{"iden":"sample input 2","content":"10\n414598724 87552841\n252911401 309688555\n623249116 421714323\n605059493 227199170\n410455266 373748111\n861647548 916369023\n527772558 682124751\n356101507 249887028\n292258775 110762985\n850583108 796044319"},{"iden":"sample output 2","content":"10\n\nIt is best to keep all 7's."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}