#include <bits/stdc++.h>
const int maxn = 100010;
const int BLOCK = 300;
int jmp[maxn];
int end[maxn];
int cnt[maxn];
int a[maxn];
int n;
void go(int now) {
  int ans = 0;
  while (jmp[now] != maxn) {
    ans += cnt[now];
    now = jmp[now];
  }
  ans += cnt[now];
  printf("%d %d\n", end[now], ans);
}
void update(int i, int j) {
  if (j > n) {
    end[i] = i;
    jmp[i] = maxn;
    cnt[i] = 1;
  } else {
    end[i] = end[j];
    if (i / BLOCK == j / BLOCK) {
      jmp[i] = jmp[j];
      cnt[i] = cnt[j] + 1;
    } else {
      jmp[i] = j;
      cnt[i] = 1;
    }
  }
}
int main() {
  int m, op, x, y;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  for (int i = n; i >= 1; i--) {
    update(i, i + a[i]);
  }
  for (int i = 0; i < m; i++) {
    scanf("%d", &op);
    if (!op) {
      scanf("%d%d", &x, &y);
      a[x] = y;
      update(x, x + a[x]);
      int start = x / BLOCK * BLOCK;
      for (int i = x - 1; i >= start; i--) {
        update(i, i + a[i]);
      }
    } else {
      scanf("%d", &x);
      go(x);
    }
  }
  return 0;
}
