An integer N (2 ≤ N ≤ 6,000), representing some quantity.
An integer K (2 ≤ K ≤ N), representing some quantity.
A list of N tuples (xi, yi), where each tuple contains two integers (1 ≤ xi, yi ≤ 1,000,000) satisfying the condition xi mod 2 = floor(yi ÷ 2) mod 2.

### Example Input:
```
3 2
2 1
1 2
1 3
```

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