#include <bits/stdc++.h>
const int maxn = 1e5 + 5, block = sqrt(maxn);
int jmp[maxn], cnt[maxn], goal[maxn], val[maxn], n;
void updata(int pos, int nxt) {
  if (nxt > n) {
    jmp[pos] = maxn;
    cnt[pos] = 1;
    goal[pos] = pos;
  } else if (pos / block * block == nxt / block * block) {
    jmp[pos] = jmp[nxt];
    cnt[pos] = cnt[nxt] + 1;
    goal[pos] = goal[nxt];
  } else {
    jmp[pos] = nxt;
    cnt[pos] = 1;
    goal[pos] = nxt;
  }
}
void cal(int pos) {
  int ans = 0, f;
  while (pos != maxn) {
    f = goal[pos];
    ans += cnt[pos];
    pos = jmp[pos];
  }
  printf("%d %d\n", f, ans);
}
int main() {
  int i, j, m, op, L;
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n; i++) scanf("%d", &val[i]);
  for (i = n; i >= 1; --i) updata(i, i + val[i]);
  while (m--) {
    scanf("%d", &op);
    if (op) {
      scanf("%d", &i);
      cal(i);
    } else {
      scanf("%d%d", &i, &j);
      val[i] = j;
      L = (i++) / block * block;
      while (--i >= L) updata(i, i + val[i]);
    }
  }
  return 0;
}
