#include <bits/stdc++.h>
using namespace std;
const int N = 100010, BLOCK_SIZE = 320;
int n, a[N], q, nextComp[N], numOfSteps[N];
int main() {
  scanf("%d%d", &n, &q);
  for (int i = (1); i <= (int)(n); ++i) scanf("%d", &a[i]);
  for (int x = (n); x >= (int)(1); --x) {
    numOfSteps[x] = 1;
    if (a[x] + x <= n && (a[x] + x) / BLOCK_SIZE == x / BLOCK_SIZE)
      nextComp[x] = nextComp[a[x] + x], numOfSteps[x] += numOfSteps[a[x] + x];
    else
      nextComp[x] = a[x] + x;
  }
  for (int i = (1); i <= (int)(q); ++i) {
    int t, x;
    scanf("%d%d", &t, &x);
    if (!t) {
      scanf("%d", &a[x]);
      int curBlock = x / BLOCK_SIZE;
      while (x > 0 && x / BLOCK_SIZE == curBlock) {
        numOfSteps[x] = 1;
        if (a[x] + x <= n && (a[x] + x) / BLOCK_SIZE == x / BLOCK_SIZE)
          nextComp[x] = nextComp[a[x] + x],
          numOfSteps[x] += numOfSteps[a[x] + x];
        else
          nextComp[x] = a[x] + x;
        --x;
      }
    } else {
      int ans = 0, last = x;
      while (x <= n) {
        ans += numOfSteps[x];
        x = nextComp[x];
        if (x <= n) last = x;
      }
      while (last + a[last] <= n) last += a[last];
      printf("%d %d\n", last, ans);
    }
  }
}
