#include <bits/stdc++.h>
const int N = 100005;
int jmp[N], end[N], cnt[N], next[N], n;
int BLOCK = 500;
void get(int x) {
  int r = 0;
  while (jmp[x] != N) {
    r += cnt[x];
    x = jmp[x];
  }
  r += cnt[x];
  printf("%d %d\n", end[x], r);
}
void up(int i, int j) {
  if (j > n) {
    end[i] = i;
    jmp[i] = N;
    cnt[i] = 1;
  } else {
    end[i] = end[j];
    if (j / BLOCK != i / BLOCK) {
      jmp[i] = j;
      cnt[i] = 1;
    } else {
      jmp[i] = jmp[j];
      cnt[i] = cnt[j] + 1;
    }
  }
}
int main() {
  int m, i, j, a, b, c;
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n; i++) scanf("%d", next + i);
  for (i = n; i > 0; i--) {
    up(i, i + next[i]);
  }
  while (m--) {
    scanf("%d", &a);
    if (!a) {
      scanf("%d%d", &b, &c);
      next[b] = c;
      up(b, b + c);
      j = b / BLOCK * BLOCK;
      for (i = b - 1; i >= j; i--)
        if (i + next[i] <= b) up(i, i + next[i]);
    } else {
      scanf("%d", &b);
      get(b);
    }
  }
  return 0;
}
