#include <bits/stdc++.h>
using namespace std;
int n, m, B, t, a, b, f[100001], nxt[100001], cnt[100001];
void update(int x) {
  if (x + f[x] > n || x / B != (x + f[x]) / B)
    nxt[x] = x, cnt[x] = 0;
  else
    nxt[x] = nxt[x + f[x]], cnt[x] = cnt[x + f[x]] + 1;
}
int main() {
  scanf("%d%d", &n, &m), B = sqrt(n);
  for (int i = 1; i <= n; i++) scanf("%d", &f[i]);
  for (int i = n; i >= 1; i--) update(i);
  for (int i = 1; i <= m; i++) {
    scanf("%d", &t);
    if (t == 1) {
      int res = 0, l;
      scanf("%d", &a);
      while (a <= n) res += cnt[a], a = nxt[a], l = a, res++, a += f[a];
      printf("%d %d\n", l, res);
    } else {
      scanf("%d%d", &a, &b), f[a] = b;
      for (int j = a; j >= 1 && j / B == a / B; j--) update(j);
    }
  }
  return 0;
}
