#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, M;
  scanf("%i %i", &N, &M);
  vector<pair<int, int> > ais = vector<pair<int, int> >(N);
  vector<int> jumps = vector<int>(N);
  for (int i = 0; i < N; i++) {
    int a;
    scanf("%i", &a);
    ais[i] = {i + a > N - 1 ? i : i + a, i + a > N - 1 ? 0 : 1};
    jumps[i] = a;
  }
  int boxsize = int(sqrt(N));
  int boxes = int(ceil(sqrt(N)));
  for (int i = 0; i < boxes; i++) {
    int l = i * boxsize;
    int r = i == boxes - 1 ? N - 1 : l + boxsize - 1;
    for (int x = r; x >= l; x--) {
      int jumpto = ais[x].first;
      if (jumpto <= r && jumpto != x)
        ais[x] = {ais[jumpto].first, ais[jumpto].second + 1};
    }
  }
  for (int q = 0; q < M; q++) {
    int t;
    scanf("%i", &t);
    if (t == 0) {
      int a, b;
      scanf("%i %i", &a, &b);
      int box = min(boxes - 1, (a - 1) / boxsize);
      int l = box * boxsize;
      int r = box == boxes - 1 ? N - 1 : l + boxsize - 1;
      ais[a - 1] = {a - 1 + b > N - 1 ? a - 1 : a - 1 + b,
                    a - 1 + b > N - 1 ? 0 : 1};
      jumps[a - 1] = b;
      for (int x = a - 1; x >= l; x--) {
        int jumpto = x + jumps[x];
        if (jumpto <= r && jumpto != x)
          ais[x] = {ais[jumpto].first, ais[jumpto].second + 1};
      }
    } else {
      int a;
      scanf("%i", &a);
      a--;
      int ans = 1;
      while (ais[a].first != a) {
        ans += ais[a].second;
        a = ais[a].first;
      }
      printf("%i %i\n", a + 1, ans);
    }
  }
  return 0;
}
