#include<bits/stdc++.h>
#define ll long long
#define endl "\n"
#define pb push_back
#define printv for(auto e:v) cout << e << " "; cout << endl;
#define printmp for(auto [x,y]:mp) cout << x << " " << y << endl; cout << endl;
using namespace std;
void solve(){
ll n; cin >> n;
vector<int>lp(n);
for(ll i=0;i<n;i++) cin >> lp[i];
for(ll i=0;i<n;i++){
ll pos = 0, ct = 0, j = i, ans = i;
while(j < n && pos < n){
pos += lp[j];
ans = j;
j += lp[j];
ct++;
}
cout << ans+1 << " " << ct << endl;
//cout << endl;
}
}
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
int t = 1; //cin >> t;
while(t--){
solve();
}
return 0;
}