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.util.*;
import java.io.*;
import static java.lang.Math.*;
public class D
{
    static InputReader in=new InputReader(System.in);
    static OutputWriter out=new OutputWriter(System.out);
    static StringBuilder sb=new StringBuilder();
    static long MOD = (long)(998244353);
    static int MAX = (int)(1e5);
    static long a[];
    static int n;
    static long st[][];

    // Main Class Starts Here
    public static void main(String[] args)throws IOException
    {
        // Write your code.

        // https://codeforces.com/contest/1549/problem/D
        // https://codeforces.com/contest/1493/problem/D

        int t = in();
        while(t-->0) {

            n = in();
            a = lan(n);

            if(n == 1){
                app(1+"\n");
                continue;
            }
            int s = n-1;
            long[] da = new long[s];

            // assign the difference array.
            for(int i = 1; i < n; i++){
                da[i-1] = abs(a[i] - a[i-1]);
            }

            // use sparse table.
            // question reduces to - max subarray with GCD > 1.
            // 2 pointers + sparse table needed.

            // System.out.println(atsl(da));

            st = new long[s][19];
            for(int i = 0; i < s; i++){
                st[i][0] = da[i];
            }

            for(int j = 1; j <= 18; j++){
                for(int i = 0; i + (1 << j) <= s; i++){
                    st[i][j] = gcd(st[i][j-1] , st[i + (1 << (j-1))][j-1]);
                }
            }

/*            for(int i=0 ; i < s; i++)
                System.out.println(atsl(st[i]));*/

            // 2 pointer.
            int l = 0;
            int r = 0;
            int max = 0;
            while(r < s){
                if(l == r){
                    r++;
                    max = max(max, (r - l + 1));
                    continue;
                }
                long gcd = query(l, r);
                if(gcd > 1){
                    r++;
                    max = max(max, (r - l + 1));
                }
                else{
                    l++;
                }
            }
            app(max+"\n");
        }
        out.printLine(sb);
        out.close();
    }

    static long query(int l, int r){
        long ans = 0L;
        for(int i = 18; i >= 0; i--){
            if(l + (1 << i) - 1 <= r){
                ans = gcd(ans, st[l][i]);
                l += (1 << i) ;
            }
        }
        return ans;
    }

    public static String atsi(int a[]){
        return Arrays.toString(a);
    }

    public static String atsl(long a[]){
        return Arrays.toString(a);
    }

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

    public static boolean isPerfectSqr(long x){
        long sqr = (long)sqrt(1.0D * x);
        prln("SQR "+ sqr+" "+x);
        if((sqr * sqr) == x) return true;
        return false;
    }

    static class DisjointSet{
        int par[];
        int rank[];
        int n;
        public DisjointSet(int n){
            this.n = n;
            par = new int[n];
            rank = new int[n];
            for(int i = 0; i < n; i++){
                par[i] = i;
            }
        }

        public int findPar(int i){
            // path compression.
            if(par[i] != i){
                par[i] = findPar(par[i]);
            }
            return par[i];
        }

        public int merge(int x, int y){
            int parX = findPar(x);
            int parY = findPar(y);
            if(parX == parY) return 0; // no decrease in connected components
            if(rank[parX] > rank[parY]){
                // merge y to x.
                par[parY] = parX;
            }
            else if(rank[parY] > rank[parX]){
                par[parX] = parY;
            }
            else{
                par[parY] = parX;
                rank[parX]++;
            }
            return 1; // after merging the decrease in connected components is 1.
        }
    }

    public static class Edge{
        int from;
        int to;
        int id;
        boolean visited;
        public Edge(int from, int to, int id){
            this.from = from;
            this.to = to;
            this.id =id;
            this.visited = false;
        }
    }

    public static int[] an(int n) {
        int ar[]=new int[n];
        for(int i=0;i<n;i++)
            ar[i]=in();
        return ar;
    }

    public static long[] lan(int n) {
        long ar[]=new long[n];
        for(int i=0;i<n;i++)
            ar[i]=lin();
        return ar;
    }

    public static String atos(Object ar[]) {
        return Arrays.toString(ar);
    }

    public static int in() {
        return in.readInt();
    }

    public static long lin() {
        return in.readLong();
    }

    public static String sn() {
        return in.readString();
    }

    public static void prln(Object o) {
        out.printLine(o);
    }

    public static void prn(Object o) {
        out.print(o);
    }

    public static void display(int a[]) {
        out.printLine(Arrays.toString(a));
    }

    public static HashMap<Integer,Integer> hm(int a[]){
        HashMap<Integer,Integer> map=new HashMap<>();
        for(int i=0; i < a.length;i++) {
            int keep = (int)map.getOrDefault(a[i],0);
            map.put(a[i],++keep);
        }
        return map;
    }

    public static void app(Object o) {
        sb.append(o);
    }

    public static long calcManhattanDist(int x1,int y1,int x2,int y2) {
        long xa = Math.abs(x1-x2);
        long ya = Math.abs(y1-y2);
        return (xa+ya);
    }


    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long readLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return readString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object...objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0)
                    writer.print(' ');
                writer.print(objects[i]);
            }
        }

        public void printLine(Object...objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }
    }
}