Types: a: int, m: int, b: int, n: int
Ranges: 1 < a, b ≤ 10^4, 1 < m, n ≤ 20
Addtl Info: a and b are distinct prime numbers