#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100001;
const int BLOCK = sqrt(MAXN);
int jmp[MAXN], cnt[MAXN], ter[MAXN], v[MAXN];
int BLOCKNUM(int x) { return x / BLOCK * BLOCK; }
void update(int x, int y, int n) {
  if (y > n) {
    jmp[x] = MAXN;
    cnt[x] = 1;
    ter[x] = x;
  } else if (BLOCKNUM(x) == BLOCKNUM(y)) {
    jmp[x] = jmp[y];
    cnt[x] = cnt[y] + 1;
    ter[x] = ter[y];
  } else {
    jmp[x] = y;
    cnt[x] = 1;
    ter[x] = ter[y];
  }
  return;
}
void calcprint(int x) {
  int ans, last;
  ans = 0;
  while (x != MAXN) {
    ans += cnt[x];
    last = ter[x];
    x = jmp[x];
  }
  printf("%d %d\n", last, ans);
  return;
}
int main() {
  int n, m, t, p, q, bln;
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", &v[i]);
  for (int i = n; i >= 1; i--) update(i, i + v[i], n);
  for (int i = 0; i < m; i++) {
    scanf("%d", &t);
    if (t == 1) {
      int p;
      scanf("%d", &p);
      calcprint(p);
    } else if (t == 0) {
      scanf("%d %d", &p, &q);
      v[p] = q;
      bln = BLOCKNUM(p);
      for (int j = p; j >= bln; j--) update(j, j + v[j], n);
    }
  }
  return 0;
}
