#include <iostream>
#include <cmath>
#include <limits>
using namespace std;
int main(){
int n,v[100],i,min=INT_MAX,copil1=1,copil2=1;
cout<<"Introduceti nr de copii: ";
cin>>n;
cout<<"Introduceti inaltimi copii: ";
cin>>v[i];
for(i=1;i<n;i++){
cin>>v[i];
if(abs(v[i]-v[i-1])<min){
min=abs(v[i]-v[i-1]);
copil1=i-1;
copil2=i;
}
}
if (abs(v[n-1]-v[0])<min){
min=abs(v[n-1]-v[0]);
copil1=0;
copil2=n-1;
}
cout<<"O pereche potrivita cu diferenta minima "<<min<<" este intre copiii "<<copil1+1<<" si "<<copil2+1;
return 0;
}