An integer \( m \) (1 ≤ \( m \) ≤ 200), representing some quantity or size.  
A list of \( m \) tuples of integers, where each tuple contains two integers (x, y) and each integer is between 0 and 1000000.  
An integer \( n \) (1 ≤ \( n \) ≤ 1000), representing some quantity or size.  
A list of \( n \) tuples of integers, where each tuple contains two integers (x, y) and each integer is between 0 and 1000000.

### Example Input:

```
5
8 5
6 4
4 3
7 10
0 10
10
10 5
2 7
9 7
8 10
10 2
1 2
8 1
6 7
6 0
0 9
```

### Function Signature:
Write a function f(inputs) that takes in the input. 
```python
def f(inputs: List[Tuple[int, List[Tuple[int, int]], int, List[Tuple[int, int]]]]):
    '''
    inputs: a list of tuples, where each tuple contains:
        - an integer
        - a list of tuples of integers
        - an integer
        - a list of tuples of integers
    '''
```