An integer a (distinct prime number).
An integer m (greater than 1).
An integer b (distinct prime number).
An integer n (greater than 1).

### Example Input:

```
3 2 2 2
```

### Function Signature:
Write a function f(inputs) that takes in the list of tuples. 
def f(inputs: List[Tuple[int, int, int, int]]): 
    '''
    inputs: a list of tuples, each containing:
        - an integer a
        - an integer m
        - an integer b
        - an integer n
    '''
