#include <bits/stdc++.h>
using namespace std;
int arr[100005];
int n, q;
int blockSZ;
int cnt[200050];
int nxt[200050];
int lastpos[200050];
int getblock(int idx) { return (idx / blockSZ + (idx % blockSZ != 0)); }
void update(int idx) {
  int lift = idx + arr[idx];
  lastpos[idx] = lastpos[lift];
  if (getblock(idx) != getblock(lift)) {
    nxt[idx] = lift;
    cnt[idx] = 1;
  } else {
    nxt[idx] = nxt[lift];
    cnt[idx] = cnt[lift] + 1;
  }
  if (lift > n) {
    nxt[idx] = n + 1;
    lastpos[idx] = idx;
  }
}
pair<int, int> query(int x) {
  pair<int, int> res;
  res.first = x;
  res.second = 0;
  while (x <= n) {
    res.second += cnt[x];
    res.first = lastpos[x];
    x = nxt[x];
  }
  return res;
}
int main() {
  scanf("%d %d", &n, &q);
  for (int i = 1; i <= n; i++) scanf("%d", arr + i);
  blockSZ = sqrt(n);
  if (blockSZ * blockSZ != n) blockSZ++;
  for (int i = n; i >= 1; i--) update(i);
  while (q--) {
    int type;
    scanf("%d", &type);
    if (type == 1) {
      int x;
      scanf("%d", &x);
      pair<int, int> res = query(x);
      printf("%d %d\n", res.first, res.second);
    } else {
      int x, p;
      scanf("%d %d", &x, &p);
      arr[x] = p;
      int tot = x % blockSZ;
      if (tot == 0) tot = blockSZ;
      while (tot--) {
        update(x);
        x--;
      }
    }
  }
}
