Problem

Source: 2023 Singapore MO Round 2 Junior Q4

Tags: number theory, prime numbers



Two distinct 2-digit prime numbers $p,q$ can be written one after the other in 2 different ways to form two 4-digit numbers. For example, 11 and 13 yield 1113 and 1311. If the two 4-digit numbers formed are both divisible by the average value of $p$ and $q$, find all possible pairs $\{p,q\}$.