#C10557. Villagers Helped

    ID: 39775 Type: Default 1000ms 256MiB

Villagers Helped

Villagers Helped

Given the coordinates of sorcerers and villagers, determine how many villagers can be helped.

A sorcerer can only help villagers whose houses are within a Euclidean distance \( d \) from their own house. Each sorcerer can help at most one villager, and each villager can be helped by at most one sorcerer.

Your task is to compute the maximum number of villagers that can be helped.

inputFormat

The first line contains three space-separated integers \( n \), \( m \), and \( d \): the number of sorcerers, the number of villagers, and the maximum distance a sorcerer can help, respectively.

The next \( n \) lines each contain two integers representing the coordinates \( (x, y) \) of each sorcerer.

Following that, the next \( m \) lines each contain two integers representing the coordinates \( (x, y) \) of each villager.

outputFormat

Output a single integer: the maximum number of villagers that can be helped by the sorcerers.

## sample
3 4 5
1 1
2 2
3 3
0 0
4 4
1 3
3 1
3