An integer n (2 ≤ n ≤ 10^5).
An integer m (2 ≤ m ≤ 10^5).
A list of n integers x, where each integer is between -10^9 and 10^9, sorted in strictly increasing order.
A list of m integers y, where each integer is between -10^9 and 10^9, sorted in strictly increasing order.

### Example Input:

```
3 3
1 3 4
1 3 6
```

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