An integer N (2 ≤ N ≤ 10^6), representing some quantity or size.
An integer M (0 ≤ M ≤ 50), representing some quantity or size.
M pairs of integers (Xi, Yi), each pair representing coordinates with values (1 ≤ Xi, Yi ≤ N).

### Example Input:

```
3 1
2 2
```

### Function Signature:
Write a function f(N, M, obstacles) that takes in the input.
def f(N: int, M: int, obstacles: List[Tuple[int, int]]): 
    ''' 
    N: an integer 
    M: an integer 
    obstacles: a list of tuples, each containing two integers
    '''