human
PYTHON3 solution for "British mathematician John Littlewood once said about Indian mathematician Srinivasa Ramanujan that "every positive integer was one of his personal friends."

It turns out that positive integers can also be friends with each other! You are given an array a of distinct positive integers. 

Define a subarray a_i, a_{i+1}, …, a_j to be a friend group if and only if there exists an integer m ≥ 2 such that a_i mod m = a_{i+1} mod m = … = a_j mod m, where x mod y denotes the remainder when x is divided by y.

Your friend Gregor wants to know the size of the largest friend group in a.

Input

Each test contains multiple test cases. The first line contains the number of test cases t (1 ≤ t ≤ 2⋅ 10^4). 

Each test case begins with a line containing the integer n (1 ≤ n ≤ 2 ⋅ 10^5), the size of the array a.

The next line contains n positive integers a_1, a_2, …, a_n (1 ≤ a_i ≤ {10}^{18}), representing the contents of the array a. It is guaranteed that all the numbers in a are distinct.

It is guaranteed that the sum of n over all test cases is less than 2⋅ 10^5.

Output

Your output should consist of t lines. Each line should consist of a single integer, the size of the largest friend group in a.

Example

Input

4
5
1 5 2 4 6
4
8 2 5 10
2
1000 2000
8
465 55 3 54 234 12 45 78

Output

3
3
2
6

Note

In the first test case, the array is [1,5,2,4,6]. The largest friend group is [2,4,6], since all those numbers are congruent to 0 modulo 2, so m=2.

In the second test case, the array is [8,2,5,10]. The largest friend group is [8,2,5], since all those numbers are congruent to 2 modulo 3, so m=3.

In the third case, the largest friend group is [1000,2000]. There are clearly many possible values of m that work.":



What is a the Python code you requested?
assistant
#Here is the Python code you requested.
 def main():
    
    
    mod=1000000007
    # mod=998244353
    # nCr =  make_nCr_mod()
    
    # LOGIC - www.youtube.com/watch?v=z0vqlIEUHjI
    
    tc=ri()
    for _ in range(tc):
        n=ri()
        a=[0]+ria()
        b=[0]*(n+1)
        
        for i in range(1,n+1):
            b[i]=abs(a[i]-a[i-1])
        
        Table=SparseTable(b,math.gcd)
                
        ans=1
        
        l,r=2,n
        
        while l<=r:
            mid=(l+r)//2
            flag=False
            for i in range(1,n-mid+2):
                left,right=i+1,i+mid-1
                val=Table.query(left,right)
                if val!=1:
                    flag=True
                    break
            if flag:
                ans=mid
                l= mid +1
            else:
                r= mid -1
        wi(ans)
        
        

def rant():
    # RANT BEGINS-
    # 
    # Did you look at the constraints dummy? Read problem again carefully understand it correctly
    # Are base cases correct n=0,n=1,n=N or string is all 0 or all 1?
    # 
    # 1.Greedy? What matters what doesnt? Is my claim correct? 
    #   Does my implementation correctly implements the greedy i thought of? 
    #   Dictionary? keep a count of values if constraint on something is low(like only alphabets(26) count)? 
    # 
    # 2.DP? Think about state's ranges maybe one of the states have lesser possible values than it may look like? 
    #   Obviously think about order of evaluation
    # 
    # 3.Binary Search?(Monotonic? any one directed order in which we have to perform something?)
    # 
    # 4.Graph?DSU?Edge property or Vertex property Read carefully? Bipartitenes Property??? Cycle Property??? 
    #   Hidden but dependency ordering of values(in 1d array or 2d Table/Array) is that of a graph???
    # 
    # 5.Number Theory?(GCD subtraction?)
    # 
    # 6.Bruteforce?(Redundant part of N which may not give answer?Constraints?)
    # 
    # 7.Range Queries?
    # 
    # 8.Any Equivalency?(We have A and B and have to do 
    #...