#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int L[N], R[N], pos[N], n, m, t, sum[N], a[N], nxt[N];
void edit(int x, int val) {
  int p = pos[x];
  a[x] = val;
  for (int i = x; i >= L[p]; i--)
    if (i + a[i] > R[p]) {
      sum[i] = 1;
      nxt[i] = i + a[i];
    } else {
      sum[i] = sum[i + a[i]] + 1;
      nxt[i] = nxt[i + a[i]];
    }
}
pair<int, int> que(int x) {
  pair<int, int> ans;
  ans.second = 0;
  while (1) {
    ans.second += sum[x];
    if (nxt[x] > n) {
      ans.first = x;
      break;
    }
    x = nxt[x];
  }
  while (ans.first + a[ans.first] <= n) ans.first += a[ans.first];
  return ans;
}
signed main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  t = sqrt(n);
  for (int i = 1; i <= t; i++) {
    L[i] = (i - 1) * sqrt(n) + 1;
    R[i] = i * sqrt(n);
  }
  if (R[t] < n) {
    L[++t] = R[t - 1] + 1;
    R[t] = n;
  }
  for (int i = 1; i <= t; i++)
    for (int j = R[i]; j >= L[i]; j--) {
      pos[j] = i;
      if (j + a[j] > R[i]) {
        sum[j] = 1;
        nxt[j] = j + a[j];
      } else {
        sum[j] = sum[j + a[j]] + 1;
        nxt[j] = nxt[j + a[j]];
      }
    }
  while (m--) {
    int mode;
    scanf("%d", &mode);
    if (mode == 1) {
      int x;
      scanf("%d", &x);
      pair<int, int> ans = que(x);
      printf("%d %d\n", ans.first, ans.second);
    } else {
      int x, y;
      scanf("%d%d", &x, &y);
      edit(x, y);
    }
  }
}
