An integer H (1 ≤ H ≤ 500), representing some height.
An integer W (1 ≤ W ≤ 500), representing some width.
Three integers A, B, C (0 ≤ A, B, C ≤ 1,000,000,000), representing some parameters.
An integer N (2 ≤ N ≤ 100,000), representing some quantity.
N pairs of integers S_i, T_i (0 ≤ S_i ≤ H, 0 ≤ T_i ≤ W), representing some coordinates.

### Example Input:

```
6 5
1 3 6
3
1 1
0 4
6 5
```

### Function Signature:
Write a function f(H, W, A, B, C, N, coordinates) that takes in the input.
```python
def f(H: int, W: int, A: int, B: int, C: int, N: int, coordinates: List[Tuple[int, int]]):
    '''
    H: an integer
    W: an integer
    A: an integer
    B: an integer
    C: an integer
    N: an integer
    coordinates: a list of tuples, each containing two integers
    '''
```