#include <bits/stdc++.h>
using namespace std;
vector<bool> c;
int a[100005], nex[100005], cnt[100005];
int N, M, n, segments, nLast;
void dfs(int pos, int L, int R) {
  if (pos + a[pos] > R) {
    nex[pos] = pos;
    cnt[pos] = 1;
    return;
  }
  if (nex[pos + a[pos]] == 0) dfs(pos + a[pos], L, R);
  nex[pos] = nex[pos + a[pos]];
  cnt[pos] = cnt[pos + a[pos]] + 1;
}
void init() {
  n = sqrt(N);
  segments = N / n;
  if (N % n) {
    segments++;
    nLast = N % n;
  }
  for (int iSegment = 0; iSegment < segments; iSegment++) {
    int i = iSegment * n + 1;
    int j = min(N, i + n - 1);
    for (int pos = i; pos <= j; pos++) {
      if (nex[pos]) continue;
      dfs(pos, i, j);
    }
  }
}
void modify(int x, int y) {
  int iSegment = (x - 1) / n;
  int L = iSegment * n + 1;
  int R = min(N, L + n - 1);
  int pos = x;
  a[pos] = y;
  dfs(pos, L, R);
  fill(c.begin(), c.end(), 0);
  c[pos - L] = 1;
  for (int i = pos - 1; i >= L; i--) {
    if (i + a[i] > R) continue;
    if (!c[i + a[i] - L]) continue;
    c[i - L] = 1;
    nex[i] = nex[i + a[i]];
    cnt[i] = cnt[i + a[i]] + 1;
  }
}
void solve(int x) {
  int pos = x, res1, res2 = cnt[pos];
  while (pos <= N) {
    res1 = pos;
    if (nex[pos] == pos) {
      pos += a[pos];
      if (pos <= N) res2 += cnt[pos];
    } else {
      pos = nex[pos];
    }
  }
  printf("%d %d\n", res1, res2);
}
int main() {
  scanf("%d%d", &N, &M);
  for (int i = 1; i <= N; i++) {
    scanf("%d", &a[i]);
  }
  init();
  c.assign(n, 0);
  while (M--) {
    int ty;
    scanf("%d", &ty);
    if (ty == 0) {
      int x, y;
      scanf("%d%d", &x, &y);
      modify(x, y);
    } else {
      int x;
      scanf("%d", &x);
      solve(x);
    }
  }
  return 0;
}
