### Canonicalized Input Description:

An integer M (1 ≤ M ≤ 500), representing some quantity or size.

A list of M tuples, each tuple containing:
1. Two integers X1 and Y1 (0 ≤ X1, Y1 ≤ 100), representing coordinates.
2. Two integers X2 and Y2 (0 ≤ X2, Y2 ≤ 100), representing coordinates.

### Example Input:

```
3
1 2 1 3
4 5 4 5
6 7 6 8
```

### Function Signature:
Write a function f(M, coordinates) that takes in the input. 
```python
def f(M: int, coordinates: List[Tuple[int, int, int, int]]):
    '''
    M: an integer
    coordinates: a list of tuples, each with four integers
    '''
```