#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const int N2 = 320;
int dp1[N2][N2], dp2[N2][N2];
int dp3[N2][N2];
int a[N];
int n, q, t, u, v;
int ret2;
int go(int idx) {
  if (idx == n) return 0;
  ret2 = dp3[idx / N2][idx % N2];
  return dp1[idx / N2][idx % N2] + go(dp2[idx / N2][idx % N2]);
}
void modify(int idx, int val) {
  a[idx] = val;
  int rt = (idx / N2 + 1) * N2 - 1;
  int lft = rt + 1 - N2;
  rt = min(rt, n);
  for (int i = rt; i >= lft; i--) {
    int blk = i / N2;
    int go_to = i + a[i];
    go_to = min(go_to, n);
    int limit = min(n, (i / N2 + 1) * N2);
    int cur = i % N2;
    if (go_to >= limit)
      dp1[blk][cur] = 1, dp2[blk][cur] = go_to, dp3[blk][cur] = i;
    else
      dp1[blk][cur] = dp1[blk][(go_to) % N2] + 1,
      dp2[blk][cur] = dp2[blk][(go_to) % N2],
      dp3[blk][cur] = dp3[blk][(go_to) % N2];
  }
}
int main() {
  scanf("%d%d", &n, &q);
  for (int i = 0; i < n; i++) scanf("%d", a + i);
  for (int i = n - 1; i >= 0; i--) {
    int blk = i / N2;
    int go_to = i + a[i];
    go_to = min(go_to, n);
    int limit = min(n, (i / N2 + 1) * N2);
    int cur = i % N2;
    if (go_to >= limit)
      dp1[blk][cur] = 1, dp2[blk][cur] = go_to, dp3[blk][cur] = i;
    else
      dp1[blk][cur] = dp1[blk][(go_to) % N2] + 1,
      dp2[blk][cur] = dp2[blk][(go_to) % N2],
      dp3[blk][cur] = dp3[blk][(go_to) % N2];
  }
  while (q--) {
    scanf("%d", &t);
    if (t) {
      scanf("%d", &u);
      u--;
      int ret = go(u);
      printf("%d %d\n", ret2 + 1, ret);
    } else {
      scanf("%d%d", &u, &v);
      u--;
      modify(u, v);
    }
  }
  return 0;
}
