We all know how great ABD aka AB-DE-VILLIERS is. However his team mates were jealous of him and posed a problem for him to solve.The problem description is as follows :

Given an array of integers,find the length of the largest subarray(contiguous) of the given array with the maximum possible GCD (Greatest Common Divisor).

For info on GCD ,see this link: https://en.wikipedia.org/wiki/Greatest_common_divisor

GCD of the subarray is defined as the GCD of all the elements of the subarray.
As ABD is not aware of competitive programming he asks your help. Help him!

-----Input-----
First line will contain integer N denoting the size of array.

Second line will contain N integers denoting array elements.

-----Output-----
The answer as specified in the problem statement .

-----Constraints-----
1 <= N <= 1000000

1 <= array[i] <=100000000000

-----Example-----
Input:
4
2 4 8 3

Output:
1

Explanation
GCD of all possible subarrays of the given array are : 2 , 2 , 2 , 1 , 4 , 4, 1 , 8 , 1 , 3

Largest GCD possible : 8

Length of the largest subarray with GCD as 8 is 1

Hence answer is 1 .

Difficulty: UNKNOWN_DIFFICULTY

Solutions:
n = eval(input())
a = list(map(int, input().split()))
c = m = 0
maxi = max(a)
for i in range(n):
	if a[i] == maxi:
		c += 1
		m = max(c, m)
	else:
		c = 0
print(m)


n = int(input())
a = list(map(int, input().split()))
m = max(a)
ans = 0
i = 0
while i < n:
	temp = 0
	if a[i] == m:
		while i < n and a[i] == m:
			i += 1
			temp += 1
		ans = max(ans, temp)
	else:
		i += 1
print(ans)