#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 50, SQ = 317;
int n, m, a[N], nxt[N], last[SQ], cnt[N];
void build() {
  for (int i = n - 1; i >= 0; i--) {
    int tmp = i / SQ;
    int q = i + a[i];
    if (q >= n) {
      nxt[i] = -1;
      cnt[i] = 1;
    } else if ((q / SQ) > tmp) {
      nxt[i] = q;
      cnt[i] = 1;
    } else {
      nxt[i] = nxt[q];
      cnt[i] = cnt[q] + 1;
    }
  }
}
void upd(int x, int y) {
  a[x] = y;
  int q = x / SQ;
  q = q * SQ;
  for (int i = x; i >= q; i--) {
    int tmp = i / SQ;
    int q = i + a[i];
    if (q >= n) {
      nxt[i] = -1;
      cnt[i] = 1;
    } else if ((q / SQ) > tmp) {
      nxt[i] = q;
      cnt[i] = 1;
    } else {
      nxt[i] = nxt[q];
      cnt[i] = cnt[q] + 1;
    }
  }
}
pair<int, int> get(int x) {
  pair<int, int> ans;
  ans.second = 0;
  int tmp = x;
  while (nxt[tmp] != -1) {
    ans.second += cnt[tmp];
    tmp = nxt[tmp];
  }
  ans.second += cnt[tmp];
  x = tmp;
  tmp = x;
  while (tmp + a[tmp] < n) tmp += a[tmp];
  ans.first = tmp;
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL), cout.tie(NULL);
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> a[i];
  build();
  for (int i = 0; i < m; i++) {
    int t;
    cin >> t;
    if (t == 0) {
      int x, y;
      cin >> x >> y;
      x--;
      upd(x, y);
    }
    if (t == 1) {
      int x;
      cin >> x;
      x--;
      pair<int, int> y = get(x);
      cout << y.first + 1 << " " << y.second << endl;
    }
  }
  return 0;
}
