The score of a sequence that contains positive integers b1,b2,…,bk is given as gcd(b1,b2,…,bk).
You are provided a sequence of positive integers a1,a2,…,an and two integers l and r (l≤r). You are required to select an integer x (l≤x≤r) and add x to all elements of the a. This provides you a new sequence of positive integersa1+x,a2+x,…,an+x.
If you have selected the x through an optimal way, then determine the maximum score of a1+x, a2+x, …,an+x?
Input format
Output format
Print an integer that represents the maximum score of a1+x,a2+x,…,an+x.
by choosing x=1 the sequence will be [2,4] which has score 2. By choosing x=2 the sequence will be [3,5] which has score 1. So we choose x=1.