const int MAX_N = 1e5 + 5;
const int BLOCK_SIZE = 350;
 
int last[MAX_N];
int cnt[MAX_N];
int a[MAX_N];
int n, m;
 
void update(int i){
  int nextPos = i + a[i];
  if(nextPos > n)
    last[i] = i, 
    cnt[i] = 0;
  else if(i / BLOCK_SIZE == nextPos / BLOCK_SIZE)
    last[i] = last[nextPos],
    cnt[i] = cnt[nextPos] + 1;
  else
    last[i] = nextPos,
    cnt[i] = 1;
}
 
int main(){
  ios_base::sync_with_stdio(0);
  cin.tie(0); cout.tie(0);
 
  cin >> n >> m;
 
  for(int i = 1; i <= n; i++)
    cin >> a[i];
 
  for(int i = n; i >= 1; i--)
    update(i);
 
  while(m--){
    int query;
    cin >> query;
    
    if(query == 1){
      int x;
      cin >> x;
 
      int cntJump = 0;
 
      while(last[x] != x){
        // lastPos = last[x];
        cntJump += cnt[x];
        x = last[x];
      }
 
      while(x + a[x] <= n){
        cntJump++;
        // lastPos = x + a[x];
        x = x + a[x];
      } 
      cout << x << " " << cntJump + 1 << '\n';
    }
 
    else{
      int x, y;
      cin >> x >> y;
      a[x] = y;
      // update(x);
      for(int i = x; i >= 1 && i / BLOCK_SIZE == x / BLOCK_SIZE; i--)
        update(i);
    }
  }
 
  return 0;
}