#include <bits/stdc++.h>
using namespace std;
int a[500005], cnt[500005], nxt[500005];
int main() {
  int n, m, i, j, k, x, y, z, l, r;
  scanf("%d%d", &n, &m);
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  ;
  int len = (int)sqrt(n + .0);
  for (i = 0; i <= (n - 1) / len; i++) {
    z = min(n - 1, (1 + i) * len - 1);
    for (j = min(n - 1, (i + 1) * len - 1); j >= i * len; j--) {
      k = j + a[j];
      if (k > z) {
        nxt[j] = k;
        cnt[j] = 1;
      } else if (nxt[k] >= n)
        nxt[j] = k, cnt[j] = 1;
      else
        nxt[j] = nxt[k], cnt[j] = 1 + cnt[k];
    }
  }
  while (m--) {
    scanf("%d", &k);
    if (k == 0) {
      scanf("%d%d", &x, &y);
      x--;
      a[x] = y;
      z = x / len;
      l = min(n - 1, (z + 1) * len - 1);
      for (j = x; j >= z * len; j--) {
        k = j + a[j];
        if (k > l) {
          nxt[j] = k;
          cnt[j] = 1;
        } else if (nxt[k] >= n)
          nxt[j] = k, cnt[j] = 1;
        else
          nxt[j] = nxt[k], cnt[j] = 1 + cnt[k];
      }
    } else {
      scanf("%d", &x);
      x--;
      int ans = 0;
      while (1) {
        ans += cnt[x];
        if (nxt[x] >= n) break;
        x = nxt[x];
      }
      printf("%d %d\n", x + 1, ans);
    }
  }
}
