An integer H (1 ≤ H ≤ 2×10^5), representing some quantity or size.
An integer W (1 ≤ W ≤ 2×10^5), representing some quantity or size.
An integer N (0 ≤ N ≤ 2×10^5), representing some quantity or size.
A list of N tuples, where each tuple contains two integers (X, Y) such that (1 ≤ X ≤ H) and (1 ≤ Y ≤ 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 tuples, where each tuple contains two integers
    '''
```