#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int a[N], nxt[N], cnt[N], block[N], n, m, sz;
inline void upd(int i) {
  if (i + a[i] >= n) {
    nxt[i] = -1;
    cnt[i] = -1;
  } else if (block[i + a[i]] == block[i]) {
    nxt[i] = nxt[i + a[i]];
    cnt[i] = cnt[i + a[i]] + 1;
  } else {
    nxt[i] = i + a[i];
    cnt[i] = 1;
  }
}
int main() {
  scanf("%d%d", &n, &m);
  sz = 400;
  for (int i = 0; i < n; i++) scanf("%d", a + i), block[i] = i / sz;
  for (int i = n - 1; i >= 0; i--) upd(i);
  for (int _i = 0, t, b; _i < m; _i++) {
    scanf("%d", &t);
    if (t) {
      scanf("%d", &t);
      t--;
      int res = 1, last = t;
      while (nxt[t] != -1) {
        res += cnt[t];
        t = nxt[t];
        last = t;
      }
      while (t + a[t] < n) {
        res++;
        t = t + a[t];
        last = t;
      }
      cout << t + 1 << " " << res << "\n";
    } else {
      scanf("%d%d", &t, &b);
      t--;
      a[t] = b;
      for (int i = t; i >= 0 and block[i] == block[t]; i--) upd(i);
    }
  }
  return 0;
}
