An integer N (2 ≤ N ≤ 200,000), representing some quantity or size.
A list of N integers A, where each integer is between 0 and 1e12.
A list of N integers B, where each integer is between 0 and 100.

### Example Input:

```
5
4 2 6 3 5
1 1 1 1 1
```

### Function Signature:
Write a function f(N, A, B) that takes in the input.
```python
def f(N: int, A: List[int], B: List[int]):
    '''
    N: an integer
    A: a list of integers
    B: a list of integers
    '''
```