#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T &x) {
  x = 0;
  char c = getchar();
  bool f = 0;
  for (; !isdigit(c); c = getchar()) f ^= c == '-';
  for (; isdigit(c); c = getchar()) x = x * 10 + (c ^ 48);
  x = f ? -x : x;
}
template <class T>
inline void write(T x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  T y = 1;
  int len = 1;
  for (; y <= x / 10; y *= 10) ++len;
  for (; len; --len, x %= y, y /= 10) putchar(x / y + 48);
}
const int MAXN = 1e5, MAX_SQRT = 320;
int n, m, blockSize, blockNum, a[MAXN + 5], bel[MAXN + 5], step[MAXN + 5],
    to[MAXN + 5];
int blockL[MAX_SQRT + 5], blockR[MAX_SQRT + 5];
inline void init() {
  blockSize = sqrt(n);
  blockNum = n / blockSize + (n % blockSize > 0);
  for (int i = 1; i <= n; ++i) bel[i] = (i - 1) / blockSize + 1;
  for (int i = 1; i <= blockNum; ++i)
    blockL[i] = (i - 1) * blockSize + 1, blockR[i] = i * blockSize;
  blockR[blockNum] = n;
  for (int i = n; i; --i) {
    to[i] = i + a[i];
    if (to[i] > blockR[bel[i]])
      step[i] = 1;
    else {
      step[i] = step[to[i]] + 1;
      to[i] = to[to[i]];
    }
  }
}
inline void update(int x, int k) {
  a[x] = k;
  for (int i = blockR[bel[x]]; i >= blockL[bel[x]]; --i) {
    to[i] = i + a[i];
    if (to[i] > blockR[bel[i]])
      step[i] = 1;
    else {
      step[i] = step[to[i]] + 1;
      to[i] = to[to[i]];
    }
  }
}
inline void query(int x) {
  int res = 0;
  for (;; x = to[x]) {
    res += step[x];
    if (to[x] > n) {
      for (;; x += a[x]) {
        if (x + a[x] > n) {
          write(x);
          putchar(' ');
          write(res);
          putchar('\n');
          return;
        }
      }
    }
  }
}
int main() {
  read(n), read(m);
  for (int i = 1; i <= n; ++i) read(a[i]);
  init();
  for (int x, k, i = 1; i <= m; ++i) {
    bool opt;
    read(opt), read(x);
    if (opt)
      query(x);
    else {
      read(k);
      update(x, k);
    }
  }
  return 0;
}
