#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
int aa[MAXN];
int nxt[MAXN];
int nnxt[MAXN];
int step[MAXN];
int group[MAXN];
int ll[MAXN];
int rr[MAXN];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  memset(ll, 0x3f, sizeof ll);
  cin >> n >> m;
  for (int i = 1; i <= n; i++) cin >> aa[i];
  int sqrtn = sqrt(n);
  for (int i = 1; i <= n; i++)
    group[i] = i / sqrtn, ll[group[i]] = min(ll[group[i]], i), rr[group[i]] = i;
  auto getnxt = [&](int i) {
    nxt[i] = i + aa[i];
    if (nxt[i] <= n && group[nxt[i]] == group[i]) {
      step[i] = step[nxt[i]] + 1;
      nnxt[i] = nnxt[nxt[i]];
      nxt[i] = nxt[nxt[i]];
    } else {
      step[i] = 1;
      nnxt[i] = i;
    }
  };
  for (int i = n; i >= 1; i--) {
    getnxt(i);
  }
  while (m--) {
    int op;
    cin >> op;
    if (op == 0) {
      int a, b;
      cin >> a >> b;
      aa[a] = b;
      for (int i = rr[group[a]]; i >= ll[group[a]]; i--) {
        getnxt(i);
      }
    } else {
      int a;
      cin >> a;
      int ans = 0;
      while (nxt[a] <= n) {
        ans += step[a];
        a = nxt[a];
      }
      ans += step[a];
      cout << nnxt[a] << " " << ans << "\n";
    }
  }
  return 0;
}
