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

# by the authority of GOD     author: manhar singh sachdev #

import os, sys
from math import *
from io import BytesIO, IOBase
import __pypy__
from types import GeneratorType


def bootstrap(f, stack=[]):
    def wrappedfunc(*args, **kwargs):
        if stack:
            return f(*args, **kwargs)
        else:
            to = f(*args, **kwargs)
            while True:
                if type(to) is GeneratorType:
                    stack.append(to)
                    to = next(to)
                else:
                    stack.pop()
                    if not stack:
                        break
                    to = stack[-1].send(to)
            return to

    return wrappedfunc


int_add = __pypy__.intop.int_add
int_sub = __pypy__.intop.int_sub
int_mul = __pypy__.intop.int_mul


def make_mod_mul(mod=10 ** 9 + 7):
    fmod_inv = 1.0 / mod

    def mod_mul(a, b, c=0):
        res = int_sub(int_add(int_mul(a, b), c), int_mul(mod, int(fmod_inv * a * b + fmod_inv * c)))
        if res >= mod:
            return res - mod
        elif res < 0:
            return res + mod
        else:
            return res

    return mod_mul


mod_mul = make_mod_mul()


def mod_pow(x, y):
    if y == 0:
        return 1
    res = 1
    while y > 1:
        if y & 1 == 1:
            res = mod_mul(res, x)
        x = mod_mul(x, x)
        y >>= 1
    return mod_mul(res, x)


least_bit = lambda xx: xx & -xx



# Consider pigeonhole
# Consider randomization
# 2D list [[0]*large_index for _ in range(small_index)]
# switch from integers to floats if all integers are ≤ 2^52 and > 32 bit int
# FLOAT : 52 bits
# if numbers bigger than float limit, consdier using Cpython or C++
# for math problems, consider binary search and lpp
# for range query, consider mo's algo and seg tree
# for constructive, consider m-coloring / odd-even
# AVOID calculation in floats
# from array import array

def main():

    def il():  # Input list
        return list(map(int, input().split()))

    def ii():  # Input int
        return int(input())

    def imi():  # Input multiple int
        return map(int, input().split())

    def gcd(a, b):
        if a == 0: return b
        return gcd(b % a, a)

    def chek(l, r, L, R, sta):
        if (L == 1) or (R == 1): return 1
        if l & 1 == 0:
            if l == (r - 1): return gcd(min(L, R),max(L,R))

            if L == sta[l]:
                L = sta[l // 2]
            else:
                L = gcd(min(L, sta[l + 1]), max(L, sta[l + 1]))
        if (r & 2):
            if R == sta[r]:
                R = sta[r // 2]
            else:
                R = gcd(min(R, sta[r - 1]), max(R, sta[r - 1]))
        return chek(l // 2, r // 2, L, R, sta)

    t = ii()
    for _ in range(t):
        n = ii()
        ar = il()
        if n < 2:
            print(n)
            continue
        elif n == 2:
            if abs(ar[0] - ar[1]) == 1:
                print(1)
            else:
                print(2)
            continue
        ar = [abs(ar[i] - ar[i + 1]) for i in range(n - 1)]
        if n <= 20:
            g = ar[0]
            l = 0
            mx = 1
            for r in range(1, n - 1):
                if g == 1:
                    g = ar[l]
                    for i in range(l + 1, r + 1):
                        g = gcd(min(g, ar[i]), max(g, ar[i]))
                else:
                    g = gcd(min(g, ar[r]), max(g, ar[r]))
                if g == 1:
                    l += 1
                else:
                    mx += 1
            if mx == 1:
                for i in ar:
                    if i != 1:
                        print(2)
                        break
                else:
                    print(1)

            else:
                print(mx + 1)

            continue

        ar.append(1)
        r = ceil(log(n, 2))
        w = 2 ** r
        m = 2 * w - 1
        sta = [0] * (m + 1)
        d = w - n
        a = m - d - n

        for i in range(m, -1, -1):
            if (m - w) < i < (m - d + 1):
                sta[i] = ar[i - a - 1]
            sta[i // 2] = gcd(min(sta[i], sta[i // 2]), max(sta[i], sta[i // 2]))
        l = 1
        mx = 1
        g = sta[a + 1]
        for r in range(2, n):

            if g == 1:
                ll = a + l
                rr = a + r
                g = chek(ll, rr, sta[ll], sta[rr], sta)
            else:
                g = gcd(min(g, sta[a + r]), max(g, sta[a + r]))

            if g == 1:
                l += 1
            else:
                mx += 1
        if mx == 1:
            for i in ar:
                if i!=1:
                    print(2)
                    break
            else: print(1)

        else:
            print(mx + 1)


# ...............CODE HERE....................

# Fast IO Region
BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")
if __name__ == '__main__':
    main()