#include <bits/stdc++.h>
using namespace std;
int nxt[100009], cnt[100009], a[100009];
int main() {
  int i, j, t1, t2, t3, t4, cur, prev, a1, a2, n, blok, q;
  scanf("%d %d", &n, &q);
  blok = sqrt(n);
  for (i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  for (i = n; i >= 1; i--) {
    t1 = i + a[i];
    if (t1 > n || i / blok != t1 / blok) {
      nxt[i] = t1;
      cnt[i] = 1;
    } else {
      nxt[i] = nxt[t1];
      cnt[i] = 1 + cnt[t1];
    }
  }
  while (q--) {
    scanf("%d", &t1);
    if (t1 == 0) {
      scanf("%d %d", &t2, &t3);
      a[t2] = t3;
      for (i = t2; i >= 1; i--) {
        if (i / blok != t2 / blok) {
          break;
        }
        t1 = i + a[i];
        if (t1 > n || i / blok != t1 / blok) {
          nxt[i] = t1;
          cnt[i] = 1;
        } else {
          nxt[i] = nxt[t1];
          cnt[i] = 1 + cnt[t1];
        }
      }
    } else {
      scanf("%d", &t2);
      a1 = a2 = 0;
      cur = t2;
      while (cur <= n) {
        a2 += cnt[cur];
        prev = cur;
        cur = nxt[cur];
      }
      while (1) {
        t1 = prev + a[prev];
        if (t1 > n) {
          break;
        }
        prev = t1;
      }
      a1 = prev;
      printf("%d %d\n", a1, a2);
    }
  }
  return 0;
}
