An integer N (2 ≤ N ≤ 6000), representing some quantity or size.
An integer K (2 ≤ K ≤ N), representing another quantity or size.
N pairs of integers (xi, yi) where each integer is between 1 and 1,000,000, representing coordinates.

### Example Input:

```
3 2
2 1
1 2
1 3
```

### Function Signature:
Write a function f(N, K, coordinates) that takes in the input.
def f(N: int, K: int, coordinates: List[Tuple[int, int]]):
    ''' 
    N: an integer 
    K: an integer
    coordinates: a list of tuples, each containing two integers
    '''