An integer N (1 ≤ N ≤ 10^5), representing some quantity or size.
An integer M (1 ≤ M ≤ 10^5), representing some quantity or size.
A list of N tuples, each containing:
- An integer A (1 ≤ A ≤ 10^5)
- An integer B (1 ≤ B ≤ 10^4)

### Example Input:

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

### Function Signature:
Write a function f(inputs) that takes in the input. 
def f(inputs: Tuple[int, int, List[Tuple[int, int]]]): 
    ''' 
    inputs: a tuple containing:
        - an integer N
        - an integer M
        - a list of tuples (A, B)
    '''