#include <bits/stdc++.h>
using namespace std;
const long long NMAX = 1e5;
long long p[NMAX];
long long cnt[NMAX], pos[NMAX];
long long ans[NMAX];
long long c = 300;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, m;
  cin >> n >> m;
  for (long long i = 0; i < n; i++) cin >> p[i];
  for (long long i = 0; i < n; i++) {
    long long cb = i / c;
    pos[i] = i;
    ans[i] = i;
    cnt[i] = 0;
    while (pos[i] / c == cb && pos[i] < n)
      ans[i] = pos[i], pos[i] += p[pos[i]], cnt[i]++;
  }
  while (m--) {
    long long rq;
    cin >> rq;
    if (rq == 1) {
      long long a;
      cin >> a;
      long long ps = --a;
      long long res = 0;
      while (true) {
        res += cnt[ps];
        if (pos[ps] >= n) break;
        ps = pos[ps];
      }
      cout << ans[ps] + 1 << " " << res << "\n";
    } else {
      long long a, b;
      cin >> a >> b;
      p[--a] = b;
      long long cb = a / c;
      pos[a] = a;
      ans[a] = a;
      cnt[a] = 0;
      while (pos[a] / c == cb && pos[a] < n)
        ans[a] = pos[a], pos[a] += p[pos[a]], cnt[a]++;
      for (long long i = a - 1; i >= cb * c; i--) {
        if ((i + p[i]) / c != cb || i + p[i] >= n) continue;
        cnt[i] = cnt[i + p[i]] + 1;
        pos[i] = pos[i + p[i]];
        ans[i] = ans[i + p[i]];
      }
    }
  }
}
