#P5544. Bomb Defender

    ID: 18774 Type: Default 1000ms 256MiB

Bomb Defender

Bomb Defender

JYY has constructed N circular buildings on a 2D map, where the i-th building is a circle with center \((x_i,y_i)\) and radius \(r_i\). There are also M enemies located on the map, with the i-th enemy positioned at \((p_i,q_i)\). JYY can deploy a bomb that detonates as a circle of a chosen radius \(r\) (with \(0 \le r \le R\)) centered at any point on the plane. Any enemy that lies inside or on the boundary of the explosion circle is eliminated.

However, because the bomb has tremendous power, if the explosion's area touches the interior of any of JYY's buildings, the building will suffer damage. Note that if the explosion touches only the boundary of a building, the building is not damaged, and if an enemy lies exactly on the boundary of the explosion, it is still eliminated.

Your task is to help JYY choose the explosion center and radius so as to eliminate as many enemies as possible while ensuring that none of his buildings incur damage.

inputFormat

The first line contains three integers \(N\), \(M\), and \(R\) — the number of buildings, the number of enemies, and the maximum bomb radius, respectively.

The next \(N\) lines each contain three integers \(x_i\), \(y_i\), and \(r_i\), representing the center coordinates and radius of the i-th building.

The following \(M\) lines each contain two integers \(p_i\) and \(q_i\), representing the coordinates of the i-th enemy.

outputFormat

Output a single integer — the maximum number of enemies that can be eliminated without causing any damage to JYY's buildings.

sample

1 3 5
0 0 2
1 1
5 5
-1 -1
2

</p>