An integer n (2 ≤ n ≤ 10^5), representing some quantity or size.
An integer m (2 ≤ m ≤ 10^5), representing some quantity or size.
A list of n integers \(x\), where each integer is between -10^9 and 10^9, in ascending order.
A list of m integers \(y\), where each integer is between -10^9 and 10^9, in ascending 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 input.
```python
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
    '''
```