CF835C Star sky

Description

The Cartesian coordinate system is set in the sky. There you can see $ n $ stars, the $ i $ -th has coordinates ( $ x_{i} $ , $ y_{i} $ ), a maximum brightness $ c $ , equal for all stars, and an initial brightness $ s_{i} $ ( $ 0

Input Format

The first line contains three integers $ n $ , $ q $ , $ c $ ( $ 1

Output Format

For each view print the total brightness of the viewed stars.

Explanation/Hint

Let's consider the first example. At the first view, you can see only the first star. At moment $ 2 $ its brightness is $ 3 $ , so the answer is $ 3 $ . At the second view, you can see only the second star. At moment $ 0 $ its brightness is $ 0 $ , so the answer is $ 0 $ . At the third view, you can see both stars. At moment $ 5 $ brightness of the first is $ 2 $ , and brightness of the second is $ 1 $ , so the answer is $ 3 $ .