#include <iostream>
#include <map>
using namespace std;
int main() {
long long n;
cin>>n;
map<long long, long long>Ox;
long long dis=0,A=0,B=0;//distance
bool zero_dis=0;
for(long long i=1;i<=n && !zero_dis;i++){
long long tmp;
cin>>tmp;
if(Ox[tmp]!=0){
zero_dis=true;
A=Ox[tmp];
B=i;
dis=0;
}
else Ox[tmp]=i;
}
if(!zero_dis){
dis=-1;
for(auto i= Ox.begin(),j=++Ox.begin(); j!=Ox.end(); i++, j++){//cout<<j->first<<" "<<i->first<<endl;
long long tmp_dis=j->first-i->first;
if(dis>tmp_dis||dis<0){
dis=tmp_dis;
A=j->second;
B=i->second;
}
}
}
cout<<dis<<"\n"<<A<<" "<<B;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8bWFwPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7Cglsb25nIGxvbmcgbjsKCWNpbj4+bjsKCW1hcDxsb25nIGxvbmcsIGxvbmcgbG9uZz5PeDsKCWxvbmcgbG9uZyBkaXM9MCxBPTAsQj0wOy8vZGlzdGFuY2UKCWJvb2wgemVyb19kaXM9MDsKCWZvcihsb25nIGxvbmcgaT0xO2k8PW4gJiYgIXplcm9fZGlzO2krKyl7CgkJbG9uZyBsb25nIHRtcDsKCQljaW4+PnRtcDsKCQlpZihPeFt0bXBdIT0wKXsKCQkJemVyb19kaXM9dHJ1ZTsKCQkJQT1PeFt0bXBdOwoJCQlCPWk7CgkJCWRpcz0wOwoJCX0KCQllbHNlIE94W3RtcF09aTsKCX0KCQoJaWYoIXplcm9fZGlzKXsKCQlkaXM9LTE7CgkJZm9yKGF1dG8gaT0gT3guYmVnaW4oKSxqPSsrT3guYmVnaW4oKTsgaiE9T3guZW5kKCk7IGkrKywgaisrKXsvL2NvdXQ8PGotPmZpcnN0PDwiICI8PGktPmZpcnN0PDxlbmRsOwoJCQlsb25nIGxvbmcgdG1wX2Rpcz1qLT5maXJzdC1pLT5maXJzdDsKCQkJaWYoZGlzPnRtcF9kaXN8fGRpczwwKXsKCQkJCWRpcz10bXBfZGlzOwoJCQkJQT1qLT5zZWNvbmQ7CgkJCQlCPWktPnNlY29uZDsKCQkJfQoJCX0KCX0KCWNvdXQ8PGRpczw8IlxuIjw8QTw8IiAiPDxCOwoJcmV0dXJuIDA7Cn0=