#include <bits/stdc++.h>
using ll = int;
using namespace std;
const int N = 1e5 + 5;
int s[N], k[N], d[N], blok[N];
int main() {
  ll n, m;
  int hfghdhdf = scanf("%d%d", &n, &m);
  ll sqrti = sqrt(n);
  for (int i = 0; i < n; i++) {
    hfghdhdf = scanf("%d", &s[i]);
    blok[i] = i / sqrti;
  }
  for (ll i = n - 1; i >= 0; i--) {
    int sii = s[i] + i;
    if (sii > n - 1) {
      k[i] = i;
      d[i] = 0;
    } else {
      if (blok[i] < blok[sii]) {
        k[i] = sii;
        d[i] = 1;
      } else {
        k[i] = k[sii];
        d[i] = d[sii] + 1;
      }
    }
  }
  for (int i = 0; i < m; i++) {
    int u;
    hfghdhdf = scanf("%d", &u);
    if (u == 0) {
      int a, b;
      hfghdhdf = scanf("%d%d", &a, &b);
      a--;
      s[a] = b;
      ll we = blok[a];
      ll oi = we * sqrti;
      for (ll j = a; j >= oi; j--) {
        ll mn = s[j] + j;
        if (mn > n - 1) {
          k[j] = j;
          d[j] = 0;
        } else {
          if (blok[j] < blok[mn]) {
            k[j] = mn;
            d[j] = 1;
          } else {
            k[j] = k[mn];
            d[j] = d[mn] + 1;
          }
        }
      }
    } else if (u == 1) {
      int a;
      hfghdhdf = scanf("%d", &a);
      ll ans = a - 1, ansi = 1;
      while (ans != k[ans]) {
        ansi += d[ans];
        ans = k[ans];
      }
      printf("%d %d\n", ans + 1, ansi);
    }
  }
  cout << endl;
  n = hfghdhdf;
  return 0;
}
