In mathematics, the greatest common divisor (gcd) of two or more integers, when at least one of them is not zero, is the largest positive integer that divides the numbers without a remainder. For example, the GCD of 8 and 12 is 4.---Wikipedia
BrotherK and Ery like playing mathematic games. Today, they are playing a game with GCD.
BrotherK has an array $A$ with $N$ elements: $A_1$ ~ $A_N$, each element is a integer in [1, 10^9]. Ery has $Q$ questions, the i-th question is to calculate
GCD($A_{L_i},~A_{L_i + 1},~A_{L_i + 2},~...,~A_{R_i}$), and BrotherK will tell her the answer.
BrotherK feels tired after he has answered $Q$ questions, so Ery can only play with herself, but she don't know any elements in array $A$. Fortunately, Ery remembered all her questions and BrotherK's answer, now she wants to recovery the array $A$.