#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int N, M;
  cin >> N >> M;
  int a[N];
  for (int i = 0; i < N; i++) cin >> a[i];
  int kur[N], kiek[N];
  int sqrtn = sqrt(N);
  auto update = [&](int pr, int pb) {
    for (int i = pb; i >= pr; i--) {
      int tolesnis = a[i] + i;
      if (tolesnis > pb) {
        kur[i] = tolesnis;
        kiek[i] = 1;
      } else {
        kur[i] = kur[tolesnis];
        kiek[i] = kiek[tolesnis] + 1;
      }
    }
  };
  for (int i = 0; i < N; i++) {
    int pr = i * sqrtn, pb = (i + 1) * sqrtn - 1;
    if (pb >= N - 1) {
      pb = N - 1;
      update(pr, pb);
      break;
    }
    update(pr, pb);
  }
  for (int i = 0; i < M; i++) {
    int type;
    cin >> type;
    if (type == 0) {
      int x, y;
      cin >> x >> y;
      x--;
      int id = x / sqrtn;
      int pr = id * sqrtn;
      int pb = (id + 1) * sqrtn - 1;
      pb = min(N - 1, pb);
      a[x] = y;
      update(pr, pb);
    } else {
      int ats = 0, vieta;
      cin >> vieta;
      vieta--;
      int priestai;
      while (vieta <= N - 1) {
        priestai = vieta;
        ats += kiek[vieta];
        vieta = kur[vieta];
      }
      while (priestai < N) {
        if (priestai + a[priestai] > N - 1)
          break;
        else
          priestai += a[priestai];
      }
      cout << priestai + 1 << " " << ats << "\n";
    }
  }
  return 0;
}
