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.
1
3
1 137438953474 274877906947
 5
1
13
1
1
6
7 19 28 25 4 10
3
3 19 10
9
26 1 28 8 24 27 12 16 17
 1
69
2 4 10 16 22 28 34 40 46 52 58 64 70 76 82 88 94 100 106 112 118 124 130 136 142 148 154 160 166 172 178 184 190 196 202 208 214 220 226 232 238 244 250 256 262 268 274 280 286 292 298 304 310 316 322 328 334 340 346 352 358 364 370 376 382 388 391 397 403
 1
20
1 3 5 7 9 11 13 15 17 19 22 25 28 31 34 37 40 43 46 49
 1
20
16 15 17 8 30 23 20 28 27 6 1 18 24 2 10 5 14 29 12 7
 3
3
14 4 27
13
26 14 6 10 5 3 29 2 24 12 22 11 1
4
10 25 29 11
 1
4
1 140688977775057788 281377955550115575 281377955925200962

3
 1
1
6
2
3
 68
 11
 4
 2
4
3
 4

# Python 3 implementation of the approach
import sys
input=sys.stdin.buffer.readline
from math import gcd, ceil, log2, pow


# A utility function to get the
# middle index from corner indexes
def getMid(s, e):
    return (s + int((e - s) / 2))


# A recursive function to get the gcd of values in given range
# of the array. The following are parameters for this function

# st --> Pointer to segment tree
# si --> Index of current node in the segment tree. Initially
# 0 is passed as root is always at index 0
# ss & se --> Starting and ending indexes of the segment represented
# by current node, i.e., st[si]
# qs & qe --> Starting and ending indexes of query range
def getGcdUtil(st, ss, se, qs, qe, si):
    # If segment of this node is a part of given range
    # then return the gcd of the segment
    if (qs <= ss and qe >= se):
        return st[si]

    # If segment of this node is outside the given range
    if (se < qs or ss > qe):
        return 0

    # If a part of this segment overlaps with the given range
    mid = getMid(ss, se)
    return gcd(getGcdUtil(st, ss, mid, qs, qe, 2 * si + 1),
               getGcdUtil(st, mid + 1, se, qs, qe, 2 * si + 2))


# A recursive function to update the nodes which have the given
# index in their range. The following are parameters
# st, si, ss and se are same as getSumUtil()
# i --> index of the element to be updated. This index is
# in the input array.
# diff --> Value to be added to all nodes which have i in range
def updateValueUtil(st, ss, se, i, diff, si):
    # Base Case: If the input index lies outside the range of
    # this segment
    if (i < ss or i > se):
        return

    # If the input index is in range of this node, then update
    # the value of the node and its children
    st[si] = st[si] + diff
    if (se != ss):
        mid = getMid(ss, se)
        updateValueUtil(st, ss, mid, i, diff, 2 * si + 1)
        updateValueUtil(st, mid + 1, se, i, diff, 2 * si + 2)


# The function to update a value in input array and segment tree.
# It uses updateValueUtil() to update the value in segment tree
def updateValue(arr, st, n, i, new_val):
    # Check for erroneous input index
    if (i < 0 or i > n - 1):
        print("Invalid Input")
        return

    # Get the difference between new value and old value
    diff = new_val - arr[i]

    # Update the value in array
    arr[i] = new_val

    # Update the values of nodes in segment tree
    updateValueUtil(st, 0, n - 1, i, diff, 0)


# Function to return the sum of elements in range
# from index qs (query start) to qe (query end)
# It mainly uses getSumUtil()
def getGcd(st, n, qs, qe):
    # Check for erroneous input values
    if (qs < 0 or qe > n - 1 or qs > qe):

        return -1

    return getGcdUtil(st, 0, n - 1, qs, qe, 0)


# A recursive function that constructs Segment Tree for array[ss..se].
# si is index of current node in segment tree st
def constructGcdUtil(arr, ss, se, st, si):
    # If there is one element in array, store it in current node of
    # segment tree and return
    if (ss == se):

        st[si] = arr[ss]
        return arr[ss]

    # If there are more than one element then recur for left and
    # right subtrees and store the sum of values in this node
    mid = getMid(ss, se)
    st[si] = gcd(constructGcdUtil(arr, ss, mid, st, si * 2 + 1),
                 constructGcdUtil(arr, mid + 1, se, st, si * 2 + 2))
    return st[si]


# Function to construct segment tree from given array. This function
# allocates memory for segment tree and calls constructSTUtil() to
# fill the allocated memory
def constructGcd(arr, n):
    # Allocate memory for the segment tree

    # Height of segment tree
    x = int(ceil(log2(n)))

    # Maximum size of segment tree
    max_size = 4 * int(pow(2, x) - 1)

    # Allocate memory
    st = [0 for i in range(max_size)]


    # Fill the allocated memory st
    constructGcdUtil(arr, 0, n - 1, st, 0)

    # Return the constructed segment tree
    return st



t=int(input())
for _ in range(t):
    n=int(input())
    a=list(map(int,input().split()))
    diff=[]
    if n==1:
        print(1)
        continue
    elif n==2:
        if abs(a[0]-a[1])==1:
            print(1)
            continue
        print(2)
        continue
    for i in range(1,n):
        diff.append(abs(a[i]-a[i-1]))
    # print(len(diff))prnt(
    tree=constructGcd(diff,n-1)
    # print(tree)
    # print(diff)
    # print(getGcd(tree, n - 1, 1, 3))
    # print(getGcd(tree, n - 1, 3, 4))

    i=0
    j=1
    curr=diff[0]
    m=2
    while j<n-1:
        # print(i,j)
        if i==j:
            j+=1
        ans=abs(getGcd(tree,n-1,i,j))
        # print(ans,"gcd")
        if abs(ans)!=1:
            m=max(m,j-i+2)
            j+=1
        else:
            i+=1
            while abs(getGcd(tree,n-1,i,j))==1 and i<j:

                i+=1
    print(m)


