{"raw_statement":[{"iden":"statement","content":"Sancho is a weird kid, he really likes rectangles. You are in charge of babysitting him and you want to keep Sancho distracted. You decided to give him a gridded sheet of paper with many dots in it, so that Sancho can draw a lot of rectangles by connecting those dots. \n\nYou don't want him to get overwhelmed with too many rectangles, so you want to know what is the number of distinct rectangles that can be formed such that each of the rectangle's vertexes is a dot, there are no dots inside or on the edges of the rectangle besides the ones on its vertexes and all sides are parallel to the axis of the grid. \n\nThe first line of the input contains one integer $N$ $(1 <= N <= 2000)$, indicating how many dots there are total in the sheet. $N$ lines will follow. The $i$th line will contain two numbers $x$ $(0 <= x <= 10^9)$ and $y$ $(0 <= y <= 10^9)$. The pair $(x, y)$ represents the coordinate of the $i$th dot on the sheet. No two dots will be in the same position.\n\nOutput the number of distinct of rectangles that can be formed such that each vertex of the rectangle is a dot, there are no dots inside or on the edges of the rectangle besides the ones on its vertexes and each rectangle is parallel to the axis of the grid.\n\n"},{"iden":"input","content":"The first line of the input contains one integer $N$ $(1 <= N <= 2000)$, indicating how many dots there are total in the sheet. $N$ lines will follow. The $i$th line will contain two numbers $x$ $(0 <= x <= 10^9)$ and $y$ $(0 <= y <= 10^9)$. The pair $(x, y)$ represents the coordinate of the $i$th dot on the sheet. No two dots will be in the same position."},{"iden":"output","content":"Output the number of distinct of rectangles that can be formed such that each vertex of the rectangle is a dot, there are no dots inside or on the edges of the rectangle besides the ones on its vertexes and each rectangle is parallel to the axis of the grid."}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ \\mathbf{P} = (x_0, y_0) $, $ \\mathbf{Q} = (x_1, y_1) $ be the initial and target positions in $ \\mathbb{R}^2 $.  \nLet $ \\mathbf{g} = (0, -9.80665) \\, \\text{m/s}^2 $ be the gravitational acceleration.  \nLet $ v_{\\text{max}} \\geq 0 $ be the maximum initial speed magnitude.  \nLet $ \\mathbf{v}_0 = (v_x, v_y) \\in \\mathbb{R}^2 $ be the initial velocity vector.  \nLet $ t > 0 $ be the time of flight.\n\n**Constraints**  \n1. $ \\mathbf{B}(t) = \\mathbf{P} + \\mathbf{v}_0 t + \\frac{1}{2} \\mathbf{g} t^2 = \\mathbf{Q} $  \n2. $ \\|\\mathbf{v}_0\\|^2 = v_x^2 + v_y^2 \\leq v_{\\text{max}}^2 $  \n3. $ t > 0 $\n\n**Objective**  \nFind $ v_x, v_y, t $ such that the above constraints are satisfied.","simple_statement":"Cai Xukun throws a basketball from point (x0, y0) to hoop (x1, y1). Gravity is (0, -9.80665). Find initial velocity (vx, vy) and time t such that the ball reaches the hoop, with speed sqrt(vx² + vy²) ≤ vmax. Output vx, vy, t with 3 decimal places.","has_page_source":false}