#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int n, m, i, j;
  cin >> n >> m;
  int p[n], par[n];
  int sn = floor(sqrt(n));
  int nob = ceil((float)n / sn);
  int next[n], jump[n];
  for (i = 0; i < n; i++) {
    cin >> p[i];
  }
  int bn;
  for (bn = 0; bn < nob; bn++) {
    for (i = min((bn + 1) * sn - 1, n - 1); i >= (bn)*sn; i--) {
      if (i + p[i] >= n) {
        next[i] = -1;
        jump[i] = 0;
      } else if (i + p[i] >= (bn + 1) * sn) {
        jump[i] = 1;
        next[i] = i + p[i];
      } else {
        jump[i] = jump[i + p[i]] + 1;
        next[i] = next[i + p[i]];
        if (next[i] == -1) next[i] = i + p[i];
      }
    }
  }
  int f, a, b;
  for (j = 0; j < m; j++) {
    cin >> f;
    if (f) {
      cin >> a;
      a--;
      int ju = jump[a];
      while (next[a] != -1) {
        a = next[a];
        ju += jump[a];
      }
      cout << a + 1 << " " << ju + 1 << "\n";
    } else {
      cin >> a >> b;
      a--;
      p[a] = b;
      bn = a / sn;
      for (i = a; i >= bn * sn; i--) {
        if (i + p[i] >= n) {
          next[i] = -1;
          jump[i] = 0;
        } else if (i + p[i] >= (bn + 1) * sn) {
          jump[i] = 1;
          next[i] = i + p[i];
        } else {
          jump[i] = jump[i + p[i]] + 1;
          next[i] = next[i + p[i]];
          if (next[i] == -1) next[i] = i + p[i];
        }
      }
    }
  }
  return 0;
}
