You are given an array of N integers. A function is defined as follows: .
F(i,j)=G.C.D(Ai,Ai+1,...Aj)
You are also given Q queries of the form L R. For every query, you must answer the value:
Input format
Output format
For each query print an integer in a new line denoting the answer to that query.
Constraints
1≤N,M≤2×105
1≤Ai≤3×108
1≤L≤R≤N