#include <bits/stdc++.h>
using namespace std;
struct Jump {
  int dest, steps;
};
const int N = 1e5 + 2;
const int BLOCK_SIZE = 320;
int a[N];
Jump f[N];
int bid[N];
int main() {
  cin.tie(NULL);
  ios_base::sync_with_stdio(false);
  int n, q;
  cin >> n >> q;
  for (int i = 0; i < n; ++i) cin >> a[i];
  for (int i = BLOCK_SIZE; i < n; i += BLOCK_SIZE) ++bid[i];
  partial_sum(bid, bid + n, bid);
  bid[n] = -1;
  auto calc = [&](int i) {
    if (int v = i + a[i]; v >= n)
      f[i] = {n, 1};
    else if (bid[i] == bid[v] && f[v].dest != n)
      f[i] = {f[v].dest, f[v].steps + 1};
    else
      f[i] = {v, 1};
  };
  for (int i = n - 1; i >= 0; --i) calc(i);
  while (q--) {
    int type, u, v;
    cin >> type >> u;
    --u;
    if (type == 0) {
      cin >> v;
      a[u] = v;
      for (int i = u; i >= 0 && bid[i] == bid[u]; --i) calc(i);
    } else {
      int jumps = 0;
      while (f[u].dest < n) jumps += f[u].steps, u = f[u].dest;
      cout << u + 1 << ' ' << jumps + 1 << '\n';
    }
  }
  return 0;
}
