#include <bits/stdc++.h>
using namespace std;
const int MAX = 100003;
int niz[MAX], n, m, k, t;
int skok[MAX], mesto[MAX], nxt[MAX];
void segment(int p) {
  int l = p * k, r = min((p + 1) * k, n);
  for (int i = r - 1; i >= l; i--) {
    if (i + niz[i] >= r) {
      skok[i] = 1;
      mesto[i] = i;
    } else {
      int kurac = i;
      kurac += niz[i];
      skok[i] = skok[kurac] + 1;
      mesto[i] = mesto[kurac];
    }
    nxt[i] = mesto[i] + niz[mesto[i]];
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> niz[i];
  }
  k = ceil(sqrt(n));
  for (int i = 0; i <= ceil(n / k); i++) {
    segment(i);
  }
  while (m--) {
    cin >> t;
    if (!t) {
      int a, b;
      cin >> a >> b;
      niz[a - 1] = b;
      segment((a - 1) / k);
    } else {
      int a, brojac = 0, gas;
      cin >> a;
      a--;
      while (true) {
        brojac += skok[a];
        if (nxt[a] < n)
          a = nxt[a];
        else {
          gas = mesto[a];
          break;
        }
      }
      cout << gas + 1 << " " << brojac << endl;
    }
  }
  return 0;
}
