#include <bits/stdc++.h>
using namespace std;
int BLOCK;
int n, q, last, vet[101010], dp[101010], to[101010], last_of_block[101010];
int block(int i) { return i / BLOCK; }
void build_range(int a, int b) {
  for (int i = b; i >= a; i--) {
    int x = i + vet[i];
    if (x >= n) {
      dp[i] = 1;
      last_of_block[i] = i;
      to[i] = -1;
    } else if (block(x) != block(i)) {
      dp[i] = 1;
      last_of_block[i] = i;
      to[i] = x;
    } else {
      dp[i] = dp[x] + 1;
      last_of_block[i] = last_of_block[x];
      to[i] = to[x];
    }
  }
}
void update(int a, int b) {
  vet[a] = b;
  build_range(block(a) * BLOCK, min(block(a) * (BLOCK) + BLOCK - 1, n - 1));
}
void query(int a) {
  int sum = 0, last;
  for (int at = a; at != -1; at = to[at]) {
    sum += dp[at];
    last = last_of_block[at];
  }
  printf("%d %d\n", last + 1, sum);
}
int main() {
  cin >> n >> q;
  BLOCK = ceil(sqrt(n));
  for (int i = 0; i < n; i++) scanf("%d", &vet[i]);
  build_range(0, n - 1);
  int a, b, op;
  while (q--) {
    scanf("%d %d", &op, &a);
    a--;
    if (op)
      query(a);
    else {
      scanf("%d", &b);
      update(a, b);
    }
  }
}
