#include <bits/stdc++.h>
using namespace std;
int n, m, op, u, v;
struct he {
  int d, p, nx, num, nxb, lst;
} a[100005];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i].d);
  int sz = sqrt(n) + 1;
  a[n + 1].p = n + 2;
  for (int i = n; i >= 1; i--) {
    a[i].p = i / sz;
    a[i].nx = i + a[i].d > n ? n + 1 : i + a[i].d;
    if (a[i].nx != n + 1) {
      if (a[a[i].nx].p != a[i].p)
        a[i].nxb = a[i].nx, a[i].num = 1, a[i].lst = i;
      else
        a[i].nxb = a[a[i].nx].nxb, a[i].num = a[a[i].nx].num + 1,
        a[i].lst = a[a[i].nx].lst;
    } else
      a[i].num = 1, a[i].nxb = a[i].nx, a[i].lst = i;
  }
  a[0].p = -1;
  for (int i = 1; i <= m; i++) {
    scanf("%d", &op);
    if (op == 0) {
      scanf("%d%d", &u, &v);
      a[u].d = v;
      a[u].nx = u + a[u].d > n ? n + 1 : u + a[u].d;
      if (a[u].nx != n + 1) {
        if (a[a[u].nx].p != a[u].p)
          a[u].nxb = a[u].nx, a[u].num = 1, a[u].lst = u;
        else
          a[u].nxb = a[a[u].nx].nxb, a[u].num = a[a[u].nx].num + 1.,
          a[u].lst = a[a[u].nx].lst;
      } else
        a[u].num = 1, a[u].nxb = a[u].nx, a[u].lst = u;
      int now = u - 1;
      while (a[now].p == a[u].p) {
        if (a[a[now].nx].p == a[u].p)
          a[now].nxb = a[a[now].nx].nxb, a[now].num = a[a[now].nx].num + 1,
          a[now].lst = a[a[now].nx].lst;
        now--;
      }
    } else {
      scanf("%d", &u);
      int ans1, ans2 = 0;
      while (u != n + 1) {
        ans2 += a[u].num;
        ans1 = a[u].lst;
        u = a[u].nxb;
      }
      printf("%d %d\n", ans1, ans2);
    }
  }
}
