An integer H (1 ≤ H ≤ 2 * 10^5), representing some dimension.
An integer W (1 ≤ W ≤ 2 * 10^5), representing another dimension.
An integer N (0 ≤ N ≤ 2 * 10^5), representing some quantity.
A list of N pairs of integers (X_i, Y_i), where each integer is between (1 ≤ X_i ≤ H) and (1 ≤ Y_i ≤ W).

### Example Input:

```
3 3 1
3 2
```

### Function Signature:
Write a function f(H, W, N, obstacles) that takes in the input.
```python
def f(H: int, W: int, N: int, obstacles: List[Tuple[int, int]]):
    '''
    H: an integer
    W: an integer
    N: an integer
    obstacles: a list of N pairs of integers
    '''
```