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

import java.io.*;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.*;
import java.util.BitSet;
import java.util.function.BinaryOperator;

public class D {
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    static FastReader s = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);

    private static int[] rai(int n) {
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = s.nextInt();
        }
        return arr;
    }

    private static int[][] rai(int n, int m) {
        int[][] arr = new int[n][m];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                arr[i][j] = s.nextInt();
            }
        }
        return arr;
    }

    private static long[] ral(int n) {
        long[] arr = new long[n];
        for (int i = 0; i < n; i++) {
            arr[i] = s.nextLong();
        }
        return arr;
    }

    private static long[][] ral(int n, int m) {
        long[][] arr = new long[n][m];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                arr[i][j] = s.nextLong();
            }
        }
        return arr;
    }

    private static int ri() {
        return s.nextInt();
    }

    private static long rl() {
        return s.nextLong();
    }

    private static String rs() {
        return s.next();
    }


    static long gcd(long a,long b)
    {
        if(b==0)
        {
            return a;
        }
        return gcd(b,a%b);
    }

    static int MOD=(int)1e9+7;

    public static int primeFactors(long n)
    {
        // Print the number of 2s that divide n
        int count=0;
        while (n % 2 == 0) {
            count++;
            n /= 2;
        }

        // n must be odd at this point.  So we can
        // skip one element (Note i = i +2)
        for (long i = 3; i * i<=n; i += 2) {
            // While i divides n, print i and divide n
            while (n % i == 0) {
                count++;
                n /= i;
            }
        }

        // This condition is to handle the case whien
        // n is a prime number greater than 2
        if (n > 2)
            count++;

        return count;
    }
    static int factors(int n)
    {
        HashSet<Integer> set=new HashSet<>();
        for(int i=1;i*i<=n;i++)
        {
            if(n%i==0)
            {
                set.add(i);
                set.add(n/i);
            }
        }
        return set.size()-1;
    }

    static List<Integer> primes = new ArrayList<>();
    static int countPF(int x) {
        int count=0;
        for (int i:primes) {
            while (x%i==0) {
                count++;
                x/=i;
            }
        }
        if (x>1) count++;
        return count;
    }

    static List<Integer> sieveOfEratosthenes(int n)
    {

        boolean[] prime = new boolean[n + 1];
        for (int i = 0; i <= n; i++)
            prime[i] = true;

        for (int p = 2; p * p <= n; p++)
        {
            // If prime[p] is not changed, then it is a
            // prime
            if (prime[p])
            {
                // Update all multiples of p
                for (int i = p * p; i <= n; i += p)
                    prime[i] = false;
            }
        }

        List<Integer> list = new ArrayList<>();
        for(int i=2;i<=n;i++)
        {
            if(prime[i])
            {
                list.add(i);
            }

        }

        return list;
    }

    static int bsearch(SparseMatrix sp, int i ,int len)
    {
        int l=i,r=len-1;
        int ind = -1;
        while(l<=r)
        {
            int mid = (l+r)/2;
            long gcd = sp.getGCD(i,mid);
            if(gcd>1)
            {
                ind=mid;
                l=mid+1;
            }
            else
            {
                r=mid-1;
            }
        }
        return ind;
    }
    public static void main(String[] args) {
        StringBuilder ans = new StringBuilder();

        int t = ri();
//        int t=1;
        while(t-- >0)
        {
            int n=ri();
            long[] arr=ral(n);

            long[] diff = new long[n-1];
            int len = n-1;
            for(int i=0;i<len;i++)
            {
                diff[i] = Math.abs(arr[i+1]-arr[i]);
            }

            SparseMatrix sp = new SparseMatrix(diff);
            int max = Integer.MIN_VALUE;
            for(int i=0;i<len;i++)
            {
                int ind = bsearch(sp,i,len);
                max=Math.max(ind-i+1,max);
            }
            ans.append(max+1).append("\n");


        }
        out.print(ans.toString());
        out.flush();
    }
    public static class SparseMatrix {
        private long[] arr;
        private int m;
        private long[][] minSparse;
        private int[][] minIndex;

        private int n;
        public SparseMatrix(long[] arr) {
            this.arr = arr;
            this.m=arr.length;
            this.n=Integer.toBinaryString(m).length();
            minSparse=new long[n][m];
            minIndex=new int[n][m];

//        for(int i=0;i<n;i++)
//        {
//            Arrays.fill(minSparse[i],-1);
//        }
//        for(int i=0;i<n;i++)
//        {
//            Arrays.fill(minIndex[i],-1);
//        }

            createMinSparse();
        }
        private long gcd(long a,long b)
        {
            if(b==0)
            {
                return a;
            }
            return gcd(b,a%b);
        }
        private void createMinSparse()
        {
            //filling the first row of sparse matrix with the values of the input array
            for(int j=0;j<m;j++)
            {
                minSparse[0][j]=arr[j];
                minIndex[0][j]=j;
            }
            //filling other rows of the sparse matrix
            for(int i=1;i<n;i++)
            {
                for(int j=0;j+(1<<(i-1))<m;j++)
                {

                    long left=minSparse[i-1][j];
                    long right=minSparse[i-1][j+(1<<(i-1))];

                    //change to min-> max to create MaxSparseMatrix
                    minSparse[i][j]=gcd(left,right);

                    //filling index
                    if(left<=right)
                    {
                        minIndex[i][j]=minIndex[i-1][j];
                    }
                    else {
                        minIndex[i][j]=minIndex[i-1][j+(1<<(i-1))];
                    }

                }
            }
        }

        //get minimum value in range l->r inclusive
    /*
        for any range [l, r] we can find the two values and
        find their minimum. These values are defined below:

        len: length of the required range, i.e., r-l+1

        p: maximum power of 2 that can fit in len. E.g, [1,11] , len=11, thus p=3

        k: 2^p

        find the minimum between sparse[p][l] and sparse[p][r-k+1]
    */
        public long getGCD(int l,int r)
        {
            int len=r-l+1;
            int p=Integer.toBinaryString(len).length()-1;
            int k=1<<p;

            long left=minSparse[p][l];
            long right=minSparse[p][r-k+1];
            return gcd(right,left);
        }



    }

}