An integer N (1 ≤ N ≤ 2 × 10^5), representing some quantity or size.
An integer M (1 ≤ M ≤ 2 × 10^5), representing some quantity or size.
A list of tuples of integers (L_i, R_i) of size N, where 0 ≤ L_i < R_i ≤ M + 1.

### Example Input:

```
4 4
0 3
2 3
1 3
3 4
```

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