#include<bits/stdc++.h>
using namespace std;
int n;
int p[1000005];
int d[1000005];
int a[1000005];
int ans,num;
int main(){
freopen("permutrans.in","r",stdin);
freopen("permutrans.out","w",stdout);
scanf("%d",&n);
for(int i=1;i<=n;i++){
scanf("%d",&p[i]);
if(p[i]<i){
int l=1+n-i+1;
int r=l+p[i]-1;
d[l]++;
d[r+1]--;
}
else{
int sum=p[i];
int r=1+p[i]-i;
sum-=r;
d[1]++;
d[r+1]--;
if(sum!=0){
int l=r+n-p[i]+1;
r=l+sum-1;
d[l]++;
d[r+1]--;
}
}
}
for(int i=1;i<=n;i++){
a[i]=d[i]+a[i-1];
if(a[i]>ans){
ans=a[i];
num=i-1;
}
}
cout<<ans<<" "<<num;
return 0;
}