#include <bits/stdc++.h>
using namespace std;
int n, m;
int nxt[100005];
int eval[100005];
int cnum[100005];
int pwrs[100005];
int ccomp[100005];
int main() {
  for (int i = 1, tar = 317; i < 100005; tar += ((tar == i) ? 317 : 0), i++)
    cnum[i] = tar;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", pwrs + i);
  for (int i = n; i > 0; i--) {
    nxt[i] = pwrs[i] + i;
    eval[i] = i;
    if (nxt[i] <= min(cnum[i], n))
      eval[i] = eval[nxt[i]], ccomp[i] = ccomp[nxt[i]] + 1,
      nxt[i] = nxt[nxt[i]];
  }
  for (int _ = 0; _ < m; _++) {
    int t, a;
    scanf("%d%d", &t, &a);
    if (t) {
      int curr = a;
      int cnt = 0;
      int ev = 0;
      for (; curr <= n;
           ev = eval[curr], cnt += ccomp[curr] + 1, curr = nxt[curr])
        ;
      printf("%d %d\n", ev, cnt);
      continue;
    }
    int b;
    scanf("%d", &b);
    pwrs[a] = b;
    ccomp[a] = 0;
    for (int i = a; cnum[i] == cnum[a]; i--) {
      nxt[i] = pwrs[i] + i;
      eval[i] = i;
      if (nxt[i] <= min(cnum[a], n))
        eval[i] = eval[nxt[i]], ccomp[i] = ccomp[nxt[i]] + 1,
        nxt[i] = nxt[nxt[i]];
    }
  }
  return 0;
}
