#include <bits/stdc++.h>
using namespace std;
const long long N = 100 * 1000 + 100;
long long n, m;
int y;
int inp[N], clr[N] = {-1}, len[N], dad[N], anc[N];
int answer1(int v) {
  if (clr[anc[v]] == clr[v]) {
    y = anc[v];
    return len[v];
  } else {
    return len[v] + answer1(anc[v]);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 1; i <= n; ++i) {
    int num;
    cin >> num;
    if (num + i > n)
      dad[i] = -1;
    else
      dad[i] = num + i;
    clr[i] = (i - 1) / 320;
  }
  for (int i = n; i > 0; --i) {
    if (dad[i] == -1) {
      len[i] = 1;
      anc[i] = i;
      continue;
    }
    if (clr[i] != clr[dad[i]]) {
      len[i] = 1;
      anc[i] = dad[i];
      continue;
    }
    len[i] = len[dad[i]] + 1;
    anc[i] = anc[dad[i]];
  }
  for (int i = 1; i <= m; ++i) {
    bool q;
    cin >> q;
    if (!q) {
      int a, b;
      cin >> a >> b;
      if (a + b > n) {
        dad[a] = -1;
        len[a] = 1;
        anc[a] = a;
      } else {
        dad[a] = a + b;
        if (clr[a] != clr[dad[a]]) {
          len[a] = 1;
          anc[a] = a + b;
        } else {
          len[a] = len[dad[a]] + 1;
          anc[a] = anc[dad[a]];
        }
      }
      for (int j = a - 1; clr[j] == clr[a]; --j) {
        if (dad[j] == -1 || clr[dad[j]] != clr[j]) continue;
        len[j] = len[dad[j]] + 1;
        anc[j] = anc[dad[j]];
      }
    } else {
      long long a, lenans, ancans;
      cin >> a;
      int p = answer1(a);
      cout << y << ' ' << p << "\n";
    }
  }
  return 0;
}
