#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<int> a;
vector<vector<int> > blocks;
vector<vector<pair<int, int> > > ans;
int k;
void update_block(int index) {
  for (int i = blocks[index].size() - 1; i > -1; --i) {
    if (i + a[index * k + i] > blocks[index].size() - 1) {
      ans[index][i] = {index * k + i + 1, 1};
    } else {
      ans[index][i] = {ans[index][i + a[index * k + i]].first,
                       ans[index][i + a[index * k + i]].second + 1};
    }
  }
}
pair<int, int> get_ans(int index) {
  int cnt_now = 0;
  int last;
  while (index / k < ans.size() && index < n) {
    cnt_now += ans[index / k][index % k].second;
    last = ans[index / k][index % k].first;
    index = (last - 1) + a[last - 1];
  }
  return {last, cnt_now};
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> m;
  k = 1000;
  a.resize(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i += k) {
    vector<int> block_now;
    for (int j = i; j < min(i + k, n); ++j) {
      block_now.push_back(a[j]);
    }
    blocks.push_back(block_now);
  }
  ans.resize(blocks.size());
  for (int j = 0; j < blocks.size(); ++j) {
    ans[j].resize(blocks[j].size());
    for (int i = blocks[j].size() - 1; i > -1; --i) {
      if (i + a[j * k + i] > blocks[j].size() - 1) {
        ans[j][i] = {j * k + i + 1, 1};
      } else {
        ans[j][i] = {ans[j][i + a[j * k + i]].first,
                     ans[j][i + a[j * k + i]].second + 1};
      }
    }
  }
  for (int i = 0; i < m; ++i) {
    int type;
    cin >> type;
    if (type == 0) {
      int x, y;
      cin >> x >> y;
      --x;
      a[x] = y;
      update_block(x / k);
    } else {
      int x;
      cin >> x;
      --x;
      pair<int, int> ans_now = get_ans(x);
      cout << ans_now.first << " " << ans_now.second << "\n";
    }
  }
  return 0;
}
