#include <bits/stdc++.h>
using namespace std;
const int maxcnt = 318;
const int maxn = 100000;
vector<int> cnt[maxcnt];
int num[maxn], pos[maxn];
int _next[maxn], p[maxn];
int n, k;
void build() {
  for (int i = 0; i < n; ++i) {
    num[i] = i / k;
    if (!i || num[i] > num[i - 1])
      pos[i] = 0;
    else
      pos[i] = pos[i - 1] + 1;
    cnt[num[i]].push_back(0);
  }
  for (int i = 0, shift = 0; i < maxcnt; ++i) {
    if (cnt[i].empty()) break;
    int L = shift, R = shift + (int)cnt[i].size();
    for (int j = (int)cnt[i].size() - 1; j > -1; --j) {
      if (j + p[L + j] < (int)cnt[i].size()) {
        cnt[i][j] = 1 + cnt[i][j + p[L + j]];
        _next[j + L] = _next[j + L + p[L + j]];
      } else {
        cnt[i][j] = 1;
        _next[j + L] = j + L + p[L + j];
      }
    }
    shift = R;
  }
}
void s_p(int ind, int power) {
  p[ind] = power;
  int L = num[ind] * k;
  int R = L + (int)cnt[num[ind]].size();
  for (int j = pos[ind]; j > -1; --j) {
    if (j + p[j + L] < (int)cnt[num[ind]].size()) {
      cnt[num[ind]][j] = 1 + cnt[num[ind]][j + p[j + L]];
      _next[j + L] = _next[j + L + p[L + j]];
    } else {
      cnt[num[ind]][j] = 1;
      _next[j + L] = j + L + p[L + j];
    }
  }
}
void query(int ind) {
  int len = 0;
  while (_next[ind] < n) {
    len += cnt[num[ind]][pos[ind]];
    ind = _next[ind];
  }
  len += cnt[num[ind]][pos[ind]];
  while (ind + p[ind] < n) ind += p[ind];
  cout << ind + 1 << ' ' << len << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int m;
  cin >> n >> m;
  k = maxcnt;
  for (int i = 0; i < n; ++i) cin >> p[i];
  build();
  int t, a, b;
  while (m--) {
    cin >> t >> a;
    if (t)
      query(a - 1);
    else {
      cin >> b;
      s_p(a - 1, b);
    }
  }
  return 0;
}
