#include <bits/stdc++.h>
using namespace std;
int val[100009], cnt[100009], nxt[100009];
int k, n, M, B;
int block(int a) {
  if (a > n) {
    return (M + 1);
  }
  int b = a / k;
  if (a % k != 0) {
    b++;
  }
  return b;
}
void pre_cal() {
  int i, j, a, b, c, d;
  for (i = n; i >= 1; i--) {
    a = 0;
    j = i + val[i];
    c = block(i);
    while (1) {
      a++;
      d = block(j);
      if (d > c) {
        break;
      }
      j += val[j];
    }
    nxt[i] = j;
    cnt[i] = a;
  }
}
void update(int a, int b) {
  val[a] = b;
  int i, j, l, r, c;
  r = a;
  c = block(a);
  l = ((c - 1) * k) + 1;
  for (i = r; i >= l; i--) {
    a = i + val[i];
    if (block(a) > block(i)) {
      nxt[i] = a;
      cnt[i] = 1;
    } else {
      nxt[i] = nxt[a];
      cnt[i] = cnt[a] + 1;
    }
  }
}
int query(int a) {
  int x = 0;
  int b = a;
  while (a <= n) {
    x += cnt[a];
    b = a;
    a = nxt[a];
  }
  a = b;
  while (a <= n) {
    b = a;
    a += val[a];
  }
  B = b;
  return x;
}
int main() {
  int a, b, c, d, e, i, j, l, m, x, y, t, p;
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n; i++) {
    scanf("%d", &val[i]);
  }
  k = sqrt(n);
  M = n / k;
  if (n % k != 0) {
    M++;
  }
  pre_cal();
  for (i = 1; i <= m; i++) {
    scanf("%d", &c);
    if (c == 0) {
      scanf("%d%d", &a, &b);
      update(a, b);
    } else {
      scanf("%d", &a);
      x = query(a);
      printf("%d %d\n", B, x);
    }
  }
}
