#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
const int mod = 1e9 + 7;
int read() {
  int x = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') x = (x << 1) + (x << 3) + c - '0', c = getchar();
  return x * f;
}
struct LCT {
  int fa[N], cnt[N], root, tcnt;
  int mx[N], val[N];
  int siz[N];
  int son[N][2];
  int rev[N];
  void pushup(int pos) {
    mx[pos] = max(max(mx[son[pos][1]], mx[son[pos][0]]), val[pos]);
    siz[pos] = siz[son[pos][0]] + siz[son[pos][1]] + 1;
  }
  bool isroot(int pos) {
    return pos != son[fa[pos]][0] && pos != son[fa[pos]][1];
  }
  void addtag(int pos) {
    rev[pos] ^= 1;
    swap(son[pos][0], son[pos][1]);
  }
  void pushdown(int pos) {
    if (rev[pos]) {
      if (son[pos][1]) addtag(son[pos][1]);
      if (son[pos][0]) addtag(son[pos][0]);
      rev[pos] = 0;
    }
  }
  bool isson(int pos) { return pos == son[fa[pos]][1]; }
  void conect(int x, int d, int y) {
    son[x][d] = y;
    fa[y] = x;
  }
  void rorate(int x) {
    int y = fa[x], z = fa[y], dx = isson(x), dy = isson(y);
    fa[x] = z;
    if (!isroot(y)) son[z][dy] = x;
    conect(y, dx, son[x][dx ^ 1]);
    conect(x, dx ^ 1, y);
    pushup(y), pushup(x);
  }
  int st[N];
  void splay(int x) {
    int top;
    st[top = 1] = x;
    int u = x;
    while (!isroot(u)) u = fa[u], st[++top] = u;
    while (top) pushdown(st[top--]);
    while (!isroot(x)) {
      int y = fa[x];
      if (isroot(y)) {
        rorate(x);
      } else if (isson(x) == isson(y))
        rorate(y), rorate(x);
      else
        rorate(x), rorate(x);
    }
    pushup(x);
  }
  void access(int x) {
    for (int i = 0; x; i = x, x = fa[x]) {
      splay(x), son[x][1] = i, pushup(x);
    }
  }
  void makeroot(int x) { access(x), splay(x), addtag(x); }
  int findroot(int x) {
    access(x), splay(x);
    while (son[x][0]) pushdown(x), x = son[x][0];
    return x;
  }
  void split(int x, int y) {
    makeroot(x);
    access(y);
    splay(y);
  }
  void link(int x, int y) {
    makeroot(x);
    fa[x] = y;
  }
  void cut(int x, int y) {
    makeroot(x);
    if (findroot(y) == x) {
      split(x, y);
      if (fa[x] == y && !son[x][1]) {
        fa[x] = 0;
        son[y][0] = 0;
        pushup(y);
      }
    }
  }
} t;
int a[N];
int main() {
  int n = read();
  int m = read();
  for (int i = 1; i <= n; i++) {
    t.val[i] = i;
    t.mx[i] = i;
    a[i] = read();
    t.link(i, i + a[i] <= n ? i + a[i] : n + 1);
  }
  for (int i = 1; i <= m; i++) {
    int op = read(), x = read();
    if (op == 1) {
      t.split(x, n + 1);
      printf("%d %d\n", t.mx[n + 1], t.siz[n + 1] - 1);
    } else {
      int k = read();
      t.cut(x, x + a[x] <= n ? x + a[x] : n + 1);
      a[x] = k;
      t.link(x, x + a[x] <= n ? x + a[x] : n + 1);
    }
  }
}
