#include <iostream>
using namespace std;
long long a[101];

int main ()
{
long long n,i,brs=1,sg=0,docn=0,ngb=0,ngs=0,cic=0,del=0;
cin >>n;
for (i=1; i<=n-1; i++) cin >>a[i];
for (i=1; i<=n-1; i++) {						
						if (docn==1) if (a[i]>a[i-1]) {brs++; cic=1; sg=sg+a[i];}
						if (docn==0) docn=1;
						if (a[i]<=a[i-1]) {if (brs>ngb) {ngb=brs; ngs=sg;} sg=0; brs=1; cic=0;}
						if (cic==0) sg=a[i];
						}
if (brs>ngb) {ngb=brs; ngs=sg;}
for (i=ngs/2; i>0; i--) if (ngs%i==0) {del=i; break;}
cout <<ngb<< endl;
cout <<del<< endl;
return 0;
}
