#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int siz = 1e5 + 10;
const int base[] = {32, 114};
const int block = 350;
int n, m;
int hold[siz];
int bel[2 * siz];
int nPos[2 * siz];
int pre[2 * siz];
int sum[2 * siz];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  int cur = 1, cnt = 0;
  for (int i = 1; i <= n; i++) {
    cin >> hold[i];
    cnt++;
    if (cnt > block) {
      cnt = 1;
      cur++;
    }
    bel[i] = cur;
  }
  for (int i = n; i >= 1; i--) {
    int step = 0;
    cur = i;
    int last;
    if (bel[i + hold[i]] != bel[i]) {
      last = i;
      step = 1;
      cur = i + hold[i];
    } else {
      last = pre[i + hold[i]];
      step = sum[i + hold[i]] + 1;
      cur = nPos[i + hold[i]];
    }
    pre[i] = last;
    nPos[i] = cur;
    sum[i] = step;
  }
  while (m--) {
    bool task;
    cin >> task;
    if (task) {
      int x;
      cin >> x;
      int last = 0;
      int ans = 0;
      int cur = x;
      while (nPos[cur]) {
        ans += sum[cur];
        last = pre[cur];
        cur = nPos[cur];
      }
      cout << last << ' ' << ans << '\n';
    } else {
      int a, b;
      cin >> a >> b;
      hold[a] = b;
      int x = bel[a];
      for (int i = a; i >= (x - 1) * block + 1; i--) {
        if (bel[i + hold[i]] == x) {
          nPos[i] = nPos[i + hold[i]];
          sum[i] = sum[i + hold[i]] + 1;
          pre[i] = pre[i + hold[i]];
        } else {
          nPos[i] = i + hold[i];
          pre[i] = i;
          sum[i] = 1;
        }
      }
    }
  }
  return 0;
}
