#include <bits/stdc++.h>
using namespace std;
const int MAXN = 300010, INF = 2003456789;
int n, m, v[MAXN], prox[MAXN], ps[MAXN], t = 1, a, b, c, ult[MAXN];
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%d", &v[i]);
  t = sqrt(n) + 1;
  for (int i = n - 1; i >= 0; i--) {
    if (i + v[i] >= n)
      ps[i] = 1, prox[i] = INF, ult[i] = i;
    else if (i / t == (i + v[i]) / t)
      ps[i] = ps[i + v[i]] + 1, prox[i] = prox[i + v[i]],
      ult[i] = ult[i + v[i]];
    else
      ps[i] = 1, prox[i] = i + v[i], ult[i] = i;
  }
  for (int k = 0; k < m; k++) {
    scanf("%d %d", &a, &b);
    b--;
    if (a) {
      int atual = b, resp1 = ult[atual], resp2 = ps[atual];
      while (atual != INF) {
        atual = prox[atual];
        if (atual == INF) break;
        resp1 = ult[atual];
        resp2 += ps[atual];
      }
      printf("%d %d\n", resp1 + 1, resp2);
    } else {
      scanf("%d", &c);
      int bini = (b / t) * t, bfim = (b / t + 1) * t - 1;
      v[b] = c;
      for (int i = bfim; i >= bini; i--) {
        if (i + v[i] >= n)
          ps[i] = 1, prox[i] = INF, ult[i] = i;
        else if (i / t == (i + v[i]) / t)
          ps[i] = ps[i + v[i]] + 1, prox[i] = prox[i + v[i]],
          ult[i] = ult[i + v[i]];
        else
          ps[i] = 1, prox[i] = i + v[i], ult[i] = i;
      }
    }
  }
}
