On the first line there is an integer $T (T \leq 20)$ representing the number of test cases.
Each test case starts with three integers $n, m, k (1 \leq m \leq n \leq 10^{18}, 1 \leq k \leq 10)$ on a line where $k$ is the number of primes. Following on the next line are $k$ different primes $p_1, . . . , p_k$. It is guaranteed that $M = p_1 · p_2 · · · p_k ≤ 10^{18}$ and $p_i \leq 10^5$ for every $i ∈ \{1, . . . , k\}$.