#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 2;
const int BLOCK = 340;
const int MAX_BLOCK_SIZE = 340;
int jumps[MAX_BLOCK_SIZE][BLOCK], landing[MAX_BLOCK_SIZE][BLOCK];
int n, m, a[N];
void preProcess() {
  for (int i = n - 1; i >= 0; i--) {
    int bucketNo = i / BLOCK, starting = bucketNo * BLOCK;
    int next = i + a[i];
    if (next >= n)
      jumps[bucketNo][i - starting] = 0, landing[bucketNo][i - starting] = i;
    else {
      int nextBucket = next / BLOCK, nextStart = nextBucket * BLOCK;
      if (nextBucket == bucketNo) {
        jumps[bucketNo][i - starting] = 1 + jumps[nextBucket][next - nextStart];
        landing[bucketNo][i - starting] = landing[nextBucket][next - nextStart];
      } else {
        jumps[bucketNo][i - starting] = 1;
        landing[bucketNo][i - starting] = next;
      }
    }
  }
}
void setPower(int k, int b) {
  k--;
  a[k] = b;
  int bucketNo = k / BLOCK, starting = bucketNo * BLOCK;
  for (int i = k; i >= starting; i--) {
    int next = i + a[i];
    if (next >= n)
      jumps[bucketNo][i - starting] = 0, landing[bucketNo][i - starting] = i;
    else {
      int nextBucket = next / BLOCK, nextStart = nextBucket * BLOCK;
      if (nextBucket == bucketNo) {
        jumps[bucketNo][i - starting] = 1 + jumps[nextBucket][next - nextStart];
        landing[bucketNo][i - starting] = landing[nextBucket][next - nextStart];
      } else {
        jumps[bucketNo][i - starting] = 1;
        landing[bucketNo][i - starting] = next;
      }
    }
  }
}
pair<int, int> throwBall(int k) {
  k--;
  int bucketNo, starting, hops = 0, cur = k, last = -1;
  while (cur != last) {
    last = cur;
    bucketNo = cur / BLOCK;
    starting = bucketNo * BLOCK;
    hops += jumps[bucketNo][cur - starting];
    cur = landing[bucketNo][cur - starting];
  }
  return {hops + 1, last + 1};
}
int main() {
  scanf("%d %d", &n, &m);
  int qt, k, b;
  for (int i = 0; i < n; i++) scanf("%d", a + i);
  preProcess();
  while (m--) {
    scanf("%d %d", &qt, &k);
    if (qt == 0) {
      scanf("%d", &b);
      setPower(k, b);
    } else {
      auto ans = throwBall(k);
      printf("%d %d\n", ans.second, ans.first);
    }
  }
}
