Consider a game in which darts are thrown at a board. The board consists of 10 circles centered at the origin, with radii 20, 40, 60, 80, 100, 120, 140, 160, 180, and 200 (measured in millimeters). Each throw is scored according to where the dart lands. A throw earns p points (p ∈ {1, 2, …, 10}) if the smallest circle that encloses the hit point, or passes through it, has radius 20 · (11 − p). A throw that lands outside the largest circle earns no points.
Compute the total score of a series of n throws.
The first line contains the number of test cases T. The test cases follow.
Each test case begins with a line containing the number of throws n (1 ≤ n ≤ 10^6). Each of the next n lines contains two integers x and y (−200 ≤ x, y ≤ 200), separated by a space — the coordinates of the point hit by one throw.
For each test case, print the answer on its own line, in the order the test cases appear in the input. Each line contains a single integer — the sum of the scores of that test case's n throws.