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 integers a of size n, where each integer is between 1 and 1e9, and the list is strictly increasing.
A list of integers b of size m, where each integer is between 1 and 1e9, and the list is strictly increasing.

### Example Input:

```
4 4
1 2 4 9
1 3 4 7
```

### Function Signature:
Write a function f(n, m, a, b) that takes in the input.
def f(n: int, m: int, a: List[int], b: List[int]):
    ''' 
    n: an integer
    m: an integer
    a: a list of integers
    b: a list of integers
    '''