#include<iostream>
using namespace std;
int main()
{ 
	long long n,s = 0,so = 0,br = 0,max = 0;
	long long a[105];
	cin >> n;
	n--;
	for(long long  i = 0;i<n;i++)
	{
	   cin >> a[i];	
	}
	
	for(long long i = 0;i<n-1;i++)
	{
	    if(a[i]<a[i+1]) {br++;s+=a[i];}
	    else if(br!=0)
	    {
	    	//cout << endl;
	        br++;
	        s+=a[i];
	        if(br>max) {max = br;so = s;}	
	        br = 0;
	        s = 0;
	    }
	}
	if(br!=0)
	{
		br++;
		s+=a[n-1];
		if(br>max) {max = br;so = s;}	
		br = 0;
		s = 0;
	}
	
	long long nd = 0;
	cout << max << endl;
	for(int i = 2;i<=so/2;i++) if(so%i==0 && i>nd) nd = i;
	if(nd==0) cout << 1 << endl;
	else cout << nd << endl;
	return 0; 
}
/*
16
11 1 2 3 2 3 2 3 2 5 6 7 9 10 1

6
17 18 18 18 19
*/
