#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,fast-math,popcnt,tune=native")
#pragma GCC target("avx,avx2,sse,sse2,ssse3,sse4.1")
using namespace std;
long long get(long long a) { return a / 512; }
signed main() {
  std::ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, m;
  cin >> n >> m;
  vector<long long> a(n);
  for (long long i = 0; i < n; ++i) cin >> a[i];
  vector<pair<long long, long long>> b(n);
  for (long long i = n - 1; i >= 0; --i) {
    if (i + a[i] < n) {
      if (get(i) == get(i + a[i]))
        b[i] = b[i + a[i]], b[i].second++;
      else
        b[i] = {i + a[i], 1};
    } else {
      b[i] = {-1, 1};
    }
  }
  for (long long j = 0; j < m; ++j) {
    long long tp;
    cin >> tp;
    if (tp == 1) {
      long long i;
      cin >> i;
      i--;
      long long jumps = 0;
      long long nxt = b[i].first;
      while (nxt != -1) {
        jumps += b[i].second;
        i = nxt;
        nxt = b[i].first;
      }
      nxt = i + a[i];
      while (nxt < n) jumps++, i = nxt, nxt = i + a[i];
      cout << i + 1 << ' ' << jumps + 1 << '\n';
    } else {
      long long i, x;
      cin >> i >> x;
      i--;
      a[i] = x;
      for (long long l = i; l >= 512 * get(i); --l) {
        if (l + a[l] < n) {
          if (get(l) == get(l + a[l]))
            b[l] = b[l + a[l]], b[l].second++;
          else
            b[l] = {l + a[l], 1};
        } else {
          b[l] = {-1, 1};
        }
      }
    }
  }
  return 0;
}
